Re: [PATCH 4/9 V3] workqueue: add non_manager_role_manager_mutex_unlock()

2012-08-30 Thread Lai Jiangshan
On 08/30/2012 05:17 PM, Tejun Heo wrote: > Hello, Lai. > > On Thu, Aug 30, 2012 at 05:16:01PM +0800, Lai Jiangshan wrote: >> gcwq_unbind_fn() is unsafe even it is called from a work item. >> so we need non_manager_role_manager_mutex_unlock(). >> >> If rebind_workers() is called from a work item, i

Re: [PATCH 4/9 V3] workqueue: add non_manager_role_manager_mutex_unlock()

2012-08-30 Thread Tejun Heo
Hello, Lai. On Thu, Aug 30, 2012 at 05:16:01PM +0800, Lai Jiangshan wrote: > gcwq_unbind_fn() is unsafe even it is called from a work item. > so we need non_manager_role_manager_mutex_unlock(). > > If rebind_workers() is called from a work item, it is safe when there is > no CPU_INTENSIVE items.

Re: [PATCH 4/9 V3] workqueue: add non_manager_role_manager_mutex_unlock()

2012-08-30 Thread Lai Jiangshan
On 08/30/2012 02:25 AM, Tejun Heo wrote: > On Thu, Aug 30, 2012 at 12:51:55AM +0800, Lai Jiangshan wrote: >> If hotplug code grabbed the manager_mutex and worker_thread try to create >> a worker, the manage_worker() will return false and worker_thread go to >> process work items. Now, on the CPU, a

Re: [PATCH 4/9 V3] workqueue: add non_manager_role_manager_mutex_unlock()

2012-08-29 Thread Tejun Heo
On Thu, Aug 30, 2012 at 12:51:55AM +0800, Lai Jiangshan wrote: > If hotplug code grabbed the manager_mutex and worker_thread try to create > a worker, the manage_worker() will return false and worker_thread go to > process work items. Now, on the CPU, all workers are processing work items, > no idl

[PATCH 4/9 V3] workqueue: add non_manager_role_manager_mutex_unlock()

2012-08-29 Thread Lai Jiangshan
If hotplug code grabbed the manager_mutex and worker_thread try to create a worker, the manage_worker() will return false and worker_thread go to process work items. Now, on the CPU, all workers are processing work items, no idle_worker left/ready for managing. It breaks the concept of workqueue an