lkml.org 
[lkml]   [2013]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 06/21] workqueue: separate out pools locking into pools_mutex
On Wed, Mar 20, 2013 at 03:28:06AM +0800, Lai Jiangshan wrote:
> currently wq_mutext protects:
>
> * worker_pool_idr and unbound_pool_hash
> * pool->refcnt
> * workqueues list
> * workqueue->flags, ->nr_drainers
> * workqueue_freezing
>
> We can see that it protects very different things.
> So we need to split it and introduce a pools_mutex to protect:
>
> * worker_pool_idr and unbound_pool_hash
> * pool->refcnt
>
> (all are pools related field.)
>
> workqueue_freezing is special, it is protected by both of wq_mutext
> pools_mutex. All are because get_unbound_pool() need to read it,
> which are because POOL_FREEZING is a bad design which will be fixed later.
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>

Umm... I'm not sure about this one. What's the benefit of further
splitting wq_mutex? There's no identified bottleneck. It just makes
things more complex.

Thanks.

--
tejun


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