diff options
author | Waiman Long <longman@redhat.com> | 2024-02-08 11:10:14 -0500 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2024-02-08 09:23:38 -1000 |
commit | 49584bb8ddbe8bcfc276c2d7dd3c8890f45f5970 (patch) | |
tree | b98acf9d9e77c10012095c7410feaf9629275c9e /include/linux/workqueue.h | |
parent | d64f2fa064f8866802e23c8ec95d9d1f601480ee (diff) |
workqueue: Bind unbound workqueue rescuer to wq_unbound_cpumask
Commit 85f0ab43f9de ("kernel/workqueue: Bind rescuer to unbound
cpumask for WQ_UNBOUND") modified init_rescuer() to bind rescuer of
an unbound workqueue to the cpumask in wq->unbound_attrs. However
unbound_attrs->cpumask's of all workqueues are initialized to
cpu_possible_mask and will only be changed if it has the WQ_SYSFS flag
to expose a cpumask sysfs file to be written by users. So this patch
doesn't achieve what it is intended to do.
If an unbound workqueue is created after wq_unbound_cpumask is modified
and there is no more unbound cpumask update after that, the unbound
rescuer will be bound to all CPUs unless the workqueue is created
with the WQ_SYSFS flag and a user explicitly modified its cpumask
sysfs file. Fix this problem by binding directly to wq_unbound_cpumask
in init_rescuer().
Fixes: 85f0ab43f9de ("kernel/workqueue: Bind rescuer to unbound cpumask for WQ_UNBOUND")
Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'include/linux/workqueue.h')
0 files changed, 0 insertions, 0 deletions