From: Lai Jiangshan Date: Wed, 16 Jul 2014 06:56:36 +0000 (+0800) Subject: workqueue: wake regular worker if need_more_worker() when rescuer leave the pool X-Git-Tag: android-x86-4.4-r2~755^2~9 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=d8ca83e68c8c7efd8e5920a046d5c576b08609f0;p=android-x86%2Fkernel.git 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 Signed-off-by: Tejun Heo --- 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: 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;