diff options
author | Lai Jiangshan <laijs@cn.fujitsu.com> | 2014-07-16 02:56:36 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2014-07-18 18:46:11 -0400 |
commit | d8ca83e68c8c7efd8e5920a046d5c576b08609f0 (patch) | |
tree | b243af14a608395c8e86f08099599b5f86c6c824 | |
parent | f7537df5206929c6a6f878da7c8ecd4143793376 (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>
-rw-r--r-- | kernel/workqueue.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/workqueue.c b/kernel/workqueue.c index a791a8c32b4f..d3444169e261 100644 --- a/kernel/workqueue.c +++ b/kernel/workqueue.c | |||
@@ -2313,11 +2313,11 @@ repeat: | |||
2313 | put_pwq(pwq); | 2313 | put_pwq(pwq); |
2314 | 2314 | ||
2315 | /* | 2315 | /* |
2316 | * Leave this pool. If keep_working() is %true, notify a | 2316 | * Leave this pool. If need_more_worker() is %true, notify a |
2317 | * regular worker; otherwise, we end up with 0 concurrency | 2317 | * regular worker; otherwise, we end up with 0 concurrency |
2318 | * and stalling the execution. | 2318 | * and stalling the execution. |
2319 | */ | 2319 | */ |
2320 | if (keep_working(pool)) | 2320 | if (need_more_worker(pool)) |
2321 | wake_up_worker(pool); | 2321 | wake_up_worker(pool); |
2322 | 2322 | ||
2323 | rescuer->pool = NULL; | 2323 | rescuer->pool = NULL; |