workqueue: Remove schedule() in unbind_workers()
authorLai Jiangshan <laijs@linux.alibaba.com>
Tue, 7 Dec 2021 07:35:40 +0000 (15:35 +0800)
committerTejun Heo <tj@kernel.org>
Thu, 9 Dec 2021 22:20:24 +0000 (12:20 -1000)
commitb4ac9384ac057c5bf035fbe82fc162fa2f7b15a9
tree5dcefbd3496a2e983bf7bd6a6d74b66b843c4b72
parent11b45b0bf402b53c94c86737a440363fc36f03cd
workqueue: Remove schedule() in unbind_workers()

The commit 6d25be5782e4 ("sched/core, workqueues: Distangle worker
accounting from rq lock") changed the schedule callbacks for workqueue
and moved the schedule callback from the wakeup code to at end of
schedule() in the worker's process context.

It means that the callback wq_worker_running() is guaranteed that
it sees the %WORKER_UNBOUND flag after scheduled since unbind_workers()
is running on the same CPU that all the pool's workers bound to.

Signed-off-by: Lai Jiangshan <laijs@linux.alibaba.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c