Re: [PATCH 02/10] workqueue: destroy_worker() should destroy idle workers only

2014-05-06 Thread Lai Jiangshan
On Mon, May 5, 2014 at 9:13 PM, Tejun Heo wrote: > Hello, > > On Sun, Apr 27, 2014 at 12:08:57PM +0800, Lai Jiangshan wrote: >> @@ -1692,9 +1691,8 @@ static struct worker *alloc_worker(void) >> * create_worker - create a new workqueue worker >> * @pool: pool the new worker will belong to >>

Re: [PATCH 02/10] workqueue: destroy_worker() should destroy idle workers only

2014-05-05 Thread Tejun Heo
Hello, On Sun, Apr 27, 2014 at 12:08:57PM +0800, Lai Jiangshan wrote: > @@ -1692,9 +1691,8 @@ static struct worker *alloc_worker(void) > * create_worker - create a new workqueue worker > * @pool: pool the new worker will belong to > * > - * Create a new worker which is bound to @pool. The r

[PATCH 02/10] workqueue: destroy_worker() should destroy idle workers only

2014-04-26 Thread Lai Jiangshan
If destroy_worker() destroys a non-idle worker, it will be buggy and it is extremely hard to check. We should force destroy_worker() to destroy idle workers only. We had already ensured in the code that we only pass idle workers to destroy_worker(), so this change has no functionality changed. We