Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

cpuset: Convert boot_hk_cpus to use HK_TYPE_DOMAIN_BOOT

boot_hk_cpus is an ad-hoc copy of HK_TYPE_DOMAIN_BOOT. Remove it and use
the official version.

Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Reviewed-by: Phil Auld <pauld@redhat.com>
Reviewed-by: Chen Ridong <chenridong@huawei.com>
Reviewed-by: Waiman Long <longman@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Marco Crivellari <marco.crivellari@suse.com>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Michal Koutny <mkoutny@suse.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vlastimil Babka <vbabka@suse.cz>
Cc: Waiman Long <longman@redhat.com>
Cc: cgroups@vger.kernel.org

+7 -15
+7 -15
kernel/cgroup/cpuset.c
··· 89 89 static bool isolated_cpus_updating; 90 90 91 91 /* 92 - * Housekeeping (HK_TYPE_DOMAIN) CPUs at boot 93 - */ 94 - static cpumask_var_t boot_hk_cpus; 95 - static bool have_boot_isolcpus; 96 - 97 - /* 98 92 * A flag to force sched domain rebuild at the end of an operation. 99 93 * It can be set in 100 94 * - update_partition_sd_lb() ··· 1447 1453 * @new_cpus: cpu mask 1448 1454 * Return: true if there is conflict, false otherwise 1449 1455 * 1450 - * CPUs outside of boot_hk_cpus, if defined, can only be used in an 1456 + * CPUs outside of HK_TYPE_DOMAIN_BOOT, if defined, can only be used in an 1451 1457 * isolated partition. 1452 1458 */ 1453 1459 static bool prstate_housekeeping_conflict(int prstate, struct cpumask *new_cpus) 1454 1460 { 1455 - if (!have_boot_isolcpus) 1461 + if (!housekeeping_enabled(HK_TYPE_DOMAIN_BOOT)) 1456 1462 return false; 1457 1463 1458 - if ((prstate != PRS_ISOLATED) && !cpumask_subset(new_cpus, boot_hk_cpus)) 1464 + if ((prstate != PRS_ISOLATED) && 1465 + !cpumask_subset(new_cpus, housekeeping_cpumask(HK_TYPE_DOMAIN_BOOT))) 1459 1466 return true; 1460 1467 1461 1468 return false; ··· 3887 3892 3888 3893 BUG_ON(!alloc_cpumask_var(&cpus_attach, GFP_KERNEL)); 3889 3894 3890 - have_boot_isolcpus = housekeeping_enabled(HK_TYPE_DOMAIN); 3891 - if (have_boot_isolcpus) { 3892 - BUG_ON(!alloc_cpumask_var(&boot_hk_cpus, GFP_KERNEL)); 3893 - cpumask_copy(boot_hk_cpus, housekeeping_cpumask(HK_TYPE_DOMAIN)); 3894 - cpumask_andnot(isolated_cpus, cpu_possible_mask, boot_hk_cpus); 3895 - } 3895 + if (housekeeping_enabled(HK_TYPE_DOMAIN_BOOT)) 3896 + cpumask_andnot(isolated_cpus, cpu_possible_mask, 3897 + housekeeping_cpumask(HK_TYPE_DOMAIN_BOOT)); 3896 3898 3897 3899 return 0; 3898 3900 }