lkml.org 
[lkml]   [2013]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] workqueue: fix possible bug which may silence the pool
Hello, Lai.

On Tue, Mar 05, 2013 at 09:17:16AM +0800, Lai Jiangshan wrote:
> > But can we please just addd wake_up_worker() in the
> > for_each_std_worker_pool() loop?
>
> wake_up_worker() needed be put on the same loop which do set %WORKER_UNBOUND.
>
> mutex_lock(&pool->assoc_mutex);
> do set %WORKER_UNBOUND for normal_pri pool
> mutex_unlock(&pool->assoc_mutex);
>
> // no wakeup for normal_pri pool
> // but all workers of normal_pri pool goto sleep
>
> // try to do set %WORKER_UNBOUND for high_pri pool
> mutex_lock(&pool->assoc_mutex);
> waiting forever here due to high_pri pool's manage_workers()
> waiting on allocating memory forever(waiting normal_pri pool
> free memory, but normal_pri pool is silenced)
> mutex_unlock(&pool->assoc_mutex);

Hmmm.... I see. Can you please separate it into two patches then?
One to restructure the loop into one and the other to add wake up,
and add comment explaining why the loop has to be per-pool?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2013-03-05 19:41    [W:0.080 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site