Skip to content

Commit ef82fb5

Browse files
kchuyizhouopsiff
authored andcommitted
workqueue: Initialize wq_isolated_cpumask in workqueue_init_early()
[ Upstream commit 261dce3d64021e7ec828a17b4975ce9182e54ceb ] Now when isolcpus is enabled via the cmdline, wq_isolated_cpumask does not include these isolated CPUs, even wq_unbound_cpumask has already excluded them. It is only when we successfully configure an isolate cpuset partition that wq_isolated_cpumask gets overwritten by workqueue_unbound_exclude_cpumask(), including both the cmdline-specified isolated CPUs and the isolated CPUs within the cpuset partitions. Fix this issue by initializing wq_isolated_cpumask properly in workqueue_init_early(). Fixes: fe28f63 ("workqueue: Add workqueue_unbound_exclude_cpumask() to exclude CPUs from wq_unbound_cpumask") Signed-off-by: Chuyi Zhou <[email protected]> Reviewed-by: Waiman Long <[email protected]> Signed-off-by: Tejun Heo <[email protected]> Signed-off-by: Sasha Levin <[email protected]> (cherry picked from commit 8873080b885145c18e8a4ef2affb858068cdc19d)
1 parent 4473fc3 commit ef82fb5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/workqueue.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7731,7 +7731,8 @@ void __init workqueue_init_early(void)
77317731
restrict_unbound_cpumask("workqueue.unbound_cpus", &wq_cmdline_cpumask);
77327732

77337733
cpumask_copy(wq_requested_unbound_cpumask, wq_unbound_cpumask);
7734-
7734+
cpumask_andnot(wq_isolated_cpumask, cpu_possible_mask,
7735+
housekeeping_cpumask(HK_TYPE_DOMAIN));
77357736
pwq_cache = KMEM_CACHE(pool_workqueue, SLAB_PANIC);
77367737

77377738
unbound_wq_update_pwq_attrs_buf = alloc_workqueue_attrs();

0 commit comments

Comments
 (0)