mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 20:22:09 +00:00
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: Juri Lelli <juri.lelli@redhat.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
ab5e5b99a9
commit
85f0ab43f9
@ -4652,7 +4652,10 @@ static int init_rescuer(struct workqueue_struct *wq)
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
return 0;
|
||||
|
Loading…
Reference in New Issue
Block a user