Re: [PATCH RFC 2/2 V2] workqueue: use dedicated creater kthread for all pools

2014-07-29 Thread Tejun Heo
On Wed, Jul 30, 2014 at 11:46:02AM +0800, Lai Jiangshan wrote: > It add complexity to other things but not the code. The code is simplified. How? It can simply repeat kthread_create() until it succeeds with msleep() inbetween. How can that be more complex than what's implemented now? > And

Re: [PATCH RFC 2/2 V2] workqueue: use dedicated creater kthread for all pools

2014-07-29 Thread Lai Jiangshan
On 07/30/2014 11:23 AM, Tejun Heo wrote: > Hello, Lai. > > On Wed, Jul 30, 2014 at 08:32:51AM +0800, Lai Jiangshan wrote: >>> Why? Just sleep and retry? What's the point of requeueing? >> >> Accepted your comments except this one which may need to discuss >> for an additional round. Requeueing

Re: [PATCH RFC 2/2 V2] workqueue: use dedicated creater kthread for all pools

2014-07-29 Thread Tejun Heo
Hello, Lai. On Wed, Jul 30, 2014 at 08:32:51AM +0800, Lai Jiangshan wrote: > > Why? Just sleep and retry? What's the point of requeueing? > > Accepted your comments except this one which may need to discuss > for an additional round. Requeueing passes the retry to the > kthread_worker and

Re: [PATCH RFC 2/2 V2] workqueue: use dedicated creater kthread for all pools

2014-07-29 Thread Lai Jiangshan
On 07/29/2014 11:04 PM, Tejun Heo wrote: > Hello, > > On Tue, Jul 29, 2014 at 05:16:07PM +0800, Lai Jiangshan wrote: > > First of all, the patch is too big. This is a rather pervasive > change. Please split it up if at all possible. > >> +/* Start the mayday timer and the creater when needed

Re: [PATCH RFC 2/2 V2] workqueue: use dedicated creater kthread for all pools

2014-07-29 Thread Tejun Heo
Hello, On Tue, Jul 29, 2014 at 05:16:07PM +0800, Lai Jiangshan wrote: First of all, the patch is too big. This is a rather pervasive change. Please split it up if at all possible. > +/* Start the mayday timer and the creater when needed */ > +static inline void start_creater_work(struct

[PATCH RFC 2/2 V2] workqueue: use dedicated creater kthread for all pools

2014-07-29 Thread Lai Jiangshan
There are some problems with the managers: 1) The last idle worker prefer managing to processing. It is better that the processing of work items should be the first priority to make the whole system make progress earlier. 2) each pool always needs an additional idle worker, it is

[PATCH RFC 2/2 V2] workqueue: use dedicated creater kthread for all pools

2014-07-29 Thread Lai Jiangshan
There are some problems with the managers: 1) The last idle worker prefer managing to processing. It is better that the processing of work items should be the first priority to make the whole system make progress earlier. 2) each pool always needs an additional idle worker, it is

Re: [PATCH RFC 2/2 V2] workqueue: use dedicated creater kthread for all pools

2014-07-29 Thread Tejun Heo
Hello, On Tue, Jul 29, 2014 at 05:16:07PM +0800, Lai Jiangshan wrote: First of all, the patch is too big. This is a rather pervasive change. Please split it up if at all possible. +/* Start the mayday timer and the creater when needed */ +static inline void start_creater_work(struct

Re: [PATCH RFC 2/2 V2] workqueue: use dedicated creater kthread for all pools

2014-07-29 Thread Lai Jiangshan
On 07/29/2014 11:04 PM, Tejun Heo wrote: Hello, On Tue, Jul 29, 2014 at 05:16:07PM +0800, Lai Jiangshan wrote: First of all, the patch is too big. This is a rather pervasive change. Please split it up if at all possible. +/* Start the mayday timer and the creater when needed */

Re: [PATCH RFC 2/2 V2] workqueue: use dedicated creater kthread for all pools

2014-07-29 Thread Tejun Heo
Hello, Lai. On Wed, Jul 30, 2014 at 08:32:51AM +0800, Lai Jiangshan wrote: Why? Just sleep and retry? What's the point of requeueing? Accepted your comments except this one which may need to discuss for an additional round. Requeueing passes the retry to the kthread_worker and gives a

Re: [PATCH RFC 2/2 V2] workqueue: use dedicated creater kthread for all pools

2014-07-29 Thread Lai Jiangshan
On 07/30/2014 11:23 AM, Tejun Heo wrote: Hello, Lai. On Wed, Jul 30, 2014 at 08:32:51AM +0800, Lai Jiangshan wrote: Why? Just sleep and retry? What's the point of requeueing? Accepted your comments except this one which may need to discuss for an additional round. Requeueing passes the

Re: [PATCH RFC 2/2 V2] workqueue: use dedicated creater kthread for all pools

2014-07-29 Thread Tejun Heo
On Wed, Jul 30, 2014 at 11:46:02AM +0800, Lai Jiangshan wrote: It add complexity to other things but not the code. The code is simplified. How? It can simply repeat kthread_create() until it succeeds with msleep() inbetween. How can that be more complex than what's implemented now? And