Messages in this thread | | | Date | Fri, 18 Jul 2014 18:51:59 -0400 | From | Tejun Heo <> | Subject | Re: [PATCH] workqueue: detach rescuer from pool until the last |
| |
Hello,
On Wed, Jul 16, 2014 at 02:56:50PM +0800, Lai Jiangshan wrote: > @@ -2300,11 +2300,6 @@ repeat: > move_linked_works(work, scheduled, &n); > > process_scheduled_works(rescuer); > - spin_unlock_irq(&pool->lock); > - > - worker_detach_from_pool(rescuer, pool); > - > - spin_lock_irq(&pool->lock); > > /* > * Put the reference grabbed by send_mayday(). @pool won't > @@ -2322,8 +2317,11 @@ repeat: > wake_up_worker(pool); > > rescuer->pool = NULL; > - spin_unlock(&pool->lock); > - spin_lock(&wq_mayday_lock); > + spin_unlock_irq(&pool->lock); > + > + worker_detach_from_pool(rescuer, pool); > + > + spin_lock_irq(&wq_mayday_lock);
Can you please also update the comment above put_pwq() and explain above detach that @pool will stay around till detach is complete?
Thanks.
-- tejun
| |