Re: [PATCH 2/3] workqueue: extend wq_pool_mutex to also protect pwq-installation

2014-10-27 Thread Tejun Heo
Hello, Lai. On Wed, Oct 08, 2014 at 11:53:32AM +0800, Lai Jiangshan wrote: > Athough pwq-installation without wq_pool_mutex held is not bug, > but it is not good design, it is better to make the pwq-allocation and > installation > are in the (same) wq_pool_mutex. WHY? Why is that not a good

Re: [PATCH 2/3] workqueue: extend wq_pool_mutex to also protect pwq-installation

2014-10-27 Thread Tejun Heo
Hello, Lai. On Wed, Oct 08, 2014 at 11:53:32AM +0800, Lai Jiangshan wrote: Athough pwq-installation without wq_pool_mutex held is not bug, but it is not good design, it is better to make the pwq-allocation and installation are in the (same) wq_pool_mutex. WHY? Why is that not a good design

[PATCH 2/3] workqueue: extend wq_pool_mutex to also protect pwq-installation

2014-10-07 Thread Lai Jiangshan
Athough pwq-installation without wq_pool_mutex held is not bug, but it is not good design, it is better to make the pwq-allocation and installation are in the (same) wq_pool_mutex. And since the pwq-allocation and installation are in the same wq_pool_mutex, get_online_cpus() will not be needed

[PATCH 2/3] workqueue: extend wq_pool_mutex to also protect pwq-installation

2014-10-07 Thread Lai Jiangshan
Athough pwq-installation without wq_pool_mutex held is not bug, but it is not good design, it is better to make the pwq-allocation and installation are in the (same) wq_pool_mutex. And since the pwq-allocation and installation are in the same wq_pool_mutex, get_online_cpus() will not be needed