Messages in this thread | | | Date | Wed, 20 Mar 2013 10:58:18 -0700 | From | Tejun Heo <> | Subject | Re: [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
| |