]> git.ipfire.org Git - thirdparty/linux.git/commit
workqueue: Reap workers via kthread_stop() and remove detach_completion
authorLai Jiangshan <jiangshan.ljs@antgroup.com>
Fri, 21 Jun 2024 07:32:22 +0000 (15:32 +0800)
committerTejun Heo <tj@kernel.org>
Fri, 21 Jun 2024 22:34:02 +0000 (12:34 -1000)
commit68f83057b913467a999e1bf9e0da6a119668f769
tree89bc42296c3e9110ccdcfff3bc9a5c30501057ac
parentb56c720718e97d2a1a0523e38fdc836adc188a2e
workqueue: Reap workers via kthread_stop() and remove detach_completion

The code to kick off the destruction of workers is now in a process
context (idle_cull_fn()), so kthread_stop() can be used in the process
context to replace the work of pool->detach_completion.

The wakeup in wake_dying_workers() is unneeded after this change, but it
is harmless, jut keep it here until next patch renames wake_dying_workers()
rather than renaming it again and again.

Cc: Valentin Schneider <vschneid@redhat.com>
Signed-off-by: Lai Jiangshan <jiangshan.ljs@antgroup.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/workqueue.c