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.

workqueue: Remove HK_TYPE_WQ from affecting wq_unbound_cpumask

For historical reason, wq_unbound_cpumask is initially set as
intersection of HK_TYPE_DOMAIN, HK_TYPE_WQ and workqueue.unbound_cpus
boot command line option.

At run time, users can update the unbound cpumask via the
/sys/devices/virtual/workqueue/cpumask sysfs file. Creation
and modification of cpuset isolated partitions will also update
wq_unbound_cpumask based on the latest HK_TYPE_DOMAIN cpumask.
The HK_TYPE_WQ cpumask is out of the picture with these runtime updates.

Complete the transition by taking HK_TYPE_WQ out from the workqueue code
and make it depends on HK_TYPE_DOMAIN only from the housekeeping side.
The final goal is to eliminate HK_TYPE_WQ as a housekeeping cpumask type.

Signed-off-by: Waiman Long <longman@redhat.com>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Signed-off-by: Tejun Heo <tj@kernel.org>

authored by

Waiman Long and committed by
Tejun Heo
2ab73938 afeaa9f2

+1 -2
+1 -2
kernel/workqueue.c
··· 7081 7081 /* 7082 7082 * If the operation fails, it will fall back to 7083 7083 * wq_requested_unbound_cpumask which is initially set to 7084 - * (HK_TYPE_WQ ∩ HK_TYPE_DOMAIN) house keeping mask and rewritten 7084 + * HK_TYPE_DOMAIN house keeping mask and rewritten 7085 7085 * by any subsequent write to workqueue/cpumask sysfs file. 7086 7086 */ 7087 7087 if (!cpumask_and(cpumask, wq_requested_unbound_cpumask, hk)) ··· 7901 7901 7902 7902 cpumask_copy(wq_online_cpumask, cpu_online_mask); 7903 7903 cpumask_copy(wq_unbound_cpumask, cpu_possible_mask); 7904 - restrict_unbound_cpumask("HK_TYPE_WQ", housekeeping_cpumask(HK_TYPE_WQ)); 7905 7904 restrict_unbound_cpumask("HK_TYPE_DOMAIN", housekeeping_cpumask(HK_TYPE_DOMAIN)); 7906 7905 if (!cpumask_empty(&wq_cmdline_cpumask)) 7907 7906 restrict_unbound_cpumask("workqueue.unbound_cpus", &wq_cmdline_cpumask);