Re: [PATCH 12/31] workqueue: update synchronization rules on workqueue->pwqs

2013-03-10 Thread Tejun Heo
Hello, Lai. On Sun, Mar 10, 2013 at 06:09:28PM +0800, Lai Jiangshan wrote: > > #define for_each_pwq(pwq, wq) > > \ > > - list_for_each_entry((pwq), &(wq)->pwqs, pwqs_node) > > + list_for_each_entry_rcu((pwq), &(wq)->pwqs, pwqs_node) \ > >

Re: [PATCH 12/31] workqueue: update synchronization rules on workqueue->pwqs

2013-03-10 Thread Lai Jiangshan
On 02/03/13 11:24, Tejun Heo wrote: > Make workqueue->pwqs protected by workqueue_lock for writes and > sched-RCU protected for reads. Lockdep assertions are added to > for_each_pwq() and first_pwq() and all their users are converted to > either hold workqueue_lock or disable preemption/irq. > >

[PATCH 12/31] workqueue: update synchronization rules on workqueue->pwqs

2013-03-01 Thread Tejun Heo
Make workqueue->pwqs protected by workqueue_lock for writes and sched-RCU protected for reads. Lockdep assertions are added to for_each_pwq() and first_pwq() and all their users are converted to either hold workqueue_lock or disable preemption/irq. alloc_and_link_pwqs() is updated to use list_add