• Lai Jiangshan's avatar
    workqueue: Remove schedule() in unbind_workers() · b4ac9384
    Lai Jiangshan authored
    The commit 6d25be57 ("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: default avatarLai Jiangshan <laijs@linux.alibaba.com>
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    b4ac9384
workqueue.c 168 KB