Commit 85f0ab43 authored by Juri Lelli's avatar Juri Lelli Committed by Tejun Heo

kernel/workqueue: Bind rescuer to unbound cpumask for WQ_UNBOUND

At the time they are created unbound workqueues rescuers currently use
cpu_possible_mask as their affinity, but this can be too wide in case a
workqueue unbound mask has been set as a subset of cpu_possible_mask.

Make new rescuers use their associated workqueue unbound cpumask from
the start.
Signed-off-by: default avatarJuri Lelli <juri.lelli@redhat.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent ab5e5b99
...@@ -4652,7 +4652,10 @@ static int init_rescuer(struct workqueue_struct *wq) ...@@ -4652,7 +4652,10 @@ static int init_rescuer(struct workqueue_struct *wq)
} }
wq->rescuer = rescuer; wq->rescuer = rescuer;
kthread_bind_mask(rescuer->task, cpu_possible_mask); if (wq->flags & WQ_UNBOUND)
kthread_bind_mask(rescuer->task, wq->unbound_attrs->cpumask);
else
kthread_bind_mask(rescuer->task, cpu_possible_mask);
wake_up_process(rescuer->task); wake_up_process(rescuer->task);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment