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

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
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -4652,6 +4652,9 @@ static int init_rescuer(struct workqueue_struct *wq)
	}

	wq->rescuer = rescuer;
	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);