* [PATCH] workqueue: wake regular worker if need_more_worker() when rescuer leave the pool
@ 2014-07-16 6:56 Lai Jiangshan
2014-07-18 22:46 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Lai Jiangshan @ 2014-07-16 6:56 UTC (permalink / raw)
To: linux-kernel; +Cc: Tejun Heo, Lai Jiangshan
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>
---
kernel/workqueue.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index dfd9f68..7128053 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2308,11 +2308,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;
--
1.7.4.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] workqueue: wake regular worker if need_more_worker() when rescuer leave the pool
2014-07-16 6:56 [PATCH] workqueue: wake regular worker if need_more_worker() when rescuer leave the pool Lai Jiangshan
@ 2014-07-18 22:46 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2014-07-18 22:46 UTC (permalink / raw)
To: Lai Jiangshan; +Cc: linux-kernel
On Wed, Jul 16, 2014 at 02:56:36PM +0800, Lai Jiangshan wrote:
> 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>
Applied to wq/for-3.17.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-18 22:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-16 6:56 [PATCH] workqueue: wake regular worker if need_more_worker() when rescuer leave the pool Lai Jiangshan
2014-07-18 22:46 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®