]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita6dd2ab3b81b234eabe2e4f6c924a04b03f62d67
tree5dcefbd3496a2e983bf7bd6a6d74b66b843c4b72
parent202a4775ab867116c69077ec57c289dc953af28b
workqueue: Remove schedule() in unbind_workers()

The commit 55efb56faccd ("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