lkml.org 
[lkml]   [2014]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/2] workqueue: remove the argument @wakeup from worker_set_flags()
On Wed, Jul 16, 2014 at 06:09:59PM +0800, Lai Jiangshan wrote:
> worker_set_flags() doesn't necessarily wake next worker and the @wakeup
> can be removed, the caller can use the following conbination instead
> when needed:
>
> worker_set_flags();
> if (need_more_worker(pool))
> wake_up_worker(pool);

Hmmm, yeah, there were more places where worker_set_flags() was used
but it does seem excessive now.

> @@ -2045,7 +2032,7 @@ __acquires(&pool->lock)
> * management. They're the scheduler's responsibility.
> */
> if (unlikely(cpu_intensive))
> - worker_set_flags(worker, WORKER_CPU_INTENSIVE, true);
> + worker_set_flags(worker, WORKER_CPU_INTENSIVE);

But let's do this separately. Please drop the previous patch and
perform need_more_worker() test explicitly after setting
CPU_INTENSIVE.

Thanks.

--
tejun


\
 
 \ /
  Last update: 2014-07-19 01:21    [W:0.074 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site