aboutsummaryrefslogtreecommitdiff
path: root/kernel/workqueue.c
diff options
context:
space:
mode:
authorLai Jiangshan <laijs@cn.fujitsu.com>2014-07-16 14:56:36 +0800
committerMoyster <oysterized@gmail.com>2017-12-05 18:05:47 +0100
commit1a102d418ceb439f990c25c3cdc1764221d55a3a (patch)
treebbb1d346cca917bffbda3ee965e1685435c49da9 /kernel/workqueue.c
parent9ea86b3afcea80d38b094588a2be9c5b4f37afe4 (diff)
workqueue: wake regular worker if need_more_worker() when rescuer leave the pool
We don't need to wake up regular worker when nr_running==1, so need_more_worker() is sufficient here. And need_more_worker() gives us better readability due to the name of "keep_working()" implies the rescuer should keep working now but the rescuer is actually leaving. Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com> Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'kernel/workqueue.c')
-rw-r--r--kernel/workqueue.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index ee967ae5b..4a3bb29d4 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2500,11 +2500,11 @@ repeat:
put_pwq(pwq);
/*
- * Leave this pool. If keep_working() is %true, notify a
+ * Leave this pool. If need_more_worker() is %true, notify a
* regular worker; otherwise, we end up with 0 concurrency
* and stalling the execution.
*/
- if (keep_working(pool))
+ if (need_more_worker(pool))
wake_up_worker(pool);
rescuer->pool = NULL;