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:08:30 +0100
commit64d548dd53c28f6f76eeb3d853181c7cdc40a0ad (patch)
treea6d725961dadc45161c4efd52e194d85f5a40e79 /kernel/workqueue.c
parentbef0c7fc30ff2a8a2c02ef93c8490404ae03ecff (diff)
downloadandroid_kernel_m2note-64d548dd53c28f6f76eeb3d853181c7cdc40a0ad.tar.gz
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;