lkml.org 
[lkml]   [2013]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/21] workqueue: don't free pool->worker_idr by RCU
On Wed, Mar 20, 2013 at 03:28:02AM +0800, Lai Jiangshan wrote:
> pool->worker_idr nor worker->id is not protected by RCU.
> don't need to free pool->worker_idr by RCU.
>
> Just free it directly.
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
...
> @@ -3462,6 +3461,7 @@ static void put_unbound_pool(struct worker_pool *pool)
> destroy_worker(worker);
> WARN_ON(pool->nr_workers || pool->nr_idle);
>
> + idr_destroy(&pool->worker_idr);
> spin_unlock_irq(&pool->lock);
> mutex_unlock(&pool->manager_mutex);
> mutex_unlock(&pool->manager_arb);

I don't know about this one. It is correct but I'd prefer to have all
frees grouped together in one function rather than scattered across
two functions. It's not like idr_destroy() is expensive or anything.

Thanks.

--
tejun


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