Messages in this thread | | | Date | Mon, 27 Oct 2014 09:41:20 -0400 | From | Tejun Heo <> | Subject | Re: [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
| |