workqueue: Simplify wq_calc_pod_cpumask() with wq_online_cpumask
authorLai Jiangshan <jiangshan.ljs@antgroup.com>
Thu, 11 Jul 2024 08:35:42 +0000 (16:35 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 11 Jul 2024 22:50:34 +0000 (12:50 -1000)
commitfbb3d4c15dc0fe8a439de267db927a9ab2f44e98
tree9ef57269918b71a00d02c73e4b87442ee919e685
parent8d84baf76045f5b9567581cde17e9c3d256bb073
workqueue: Simplify wq_calc_pod_cpumask() with wq_online_cpumask

Avoid relying on cpu_online_mask for wqattrs changes so that
cpus_read_lock() can be removed from apply_wqattrs_lock().

And with wq_online_cpumask, attrs->__pod_cpumask doesn't need to be
reused as a temporary storage to calculate if the pod have any online
CPUs @attrs wants since @cpu_going_down is not in the wq_online_cpumask.

Signed-off-by: Lai Jiangshan <jiangshan.ljs@antgroup.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c