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 <la...@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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to