Re: [PATCH 1/2] workqueue: pin the pool while it is managing

2020-05-28 Thread Lai Jiangshan
On Thu, May 28, 2020 at 10:35 PM Tejun Heo wrote: > > Hello, > > On Thu, May 28, 2020 at 03:06:55AM +, Lai Jiangshan wrote: > > @@ -2129,10 +2128,21 @@ __acquires(&pool->lock) > > static bool manage_workers(struct worker *worker) > > { > > struct worker_pool *pool = worker->pool; > > +

Re: [PATCH 1/2] workqueue: pin the pool while it is managing

2020-05-28 Thread Tejun Heo
Hello, On Thu, May 28, 2020 at 03:06:55AM +, Lai Jiangshan wrote: > @@ -2129,10 +2128,21 @@ __acquires(&pool->lock) > static bool manage_workers(struct worker *worker) > { > struct worker_pool *pool = worker->pool; > + struct work_struct *work = list_first_entry(&pool->worklist, >

Re: [PATCH 1/2] workqueue: pin the pool while it is managing

2020-05-28 Thread Lai Jiangshan
On Thu, May 28, 2020 at 4:08 PM Sebastian Andrzej Siewior wrote: > > On 2020-05-28 03:06:55 [+], Lai Jiangshan wrote: > > So that put_unbound_pool() can ensure all workers in idle, > > no unfinished manager. And it doens't need to wait any manager > > and can go to delete all the idle workers

Re: [PATCH 1/2] workqueue: pin the pool while it is managing

2020-05-28 Thread Sebastian Andrzej Siewior
On 2020-05-28 03:06:55 [+], Lai Jiangshan wrote: > So that put_unbound_pool() can ensure all workers in idle, > no unfinished manager. And it doens't need to wait any manager > and can go to delete all the idle workers straight away. > > Also removes manager waitqueue, because it is unneeded a