lkml.org 
[lkml]   [2014]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] workqueue: remove get_online_cpus() from apply_workqueue_attrs()
On Wed, Oct 08, 2014 at 11:53:33AM +0800, Lai Jiangshan wrote:
> There are two aims for get_online_cpus():
> 1) Protects cpumask_of_node(node). (CPUs should stay stable)
> 2) Protects the pwq-allocation and installation
>
> But both aims are settled by other methods in previous patches:
> cpumask_of_node(node) is replaced by wq_unbound_online_cpumask, and
> the pwq-allocation and installation are changed to be protected by
> wq_pool_mutex. Now the get_online_cpus() is no reason to exist,
> remove it!
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>

Well, this is very marginal and we want to add comments explaining why
this is safe, but yeah I guess it's an improvement. Can you please
add comments explaining what states are depended upon and that they
are all protected by pool mutex?

Thanks.

--
tejun


\
 
 \ /
  Last update: 2014-10-27 15:21    [W:0.068 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site