Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-26 Thread Tejun Heo
Hello, again. On Wed, Sep 26, 2012 at 09:49:58AM -0700, Tejun Heo wrote: > > The simple version of flush_workqueue() which I sent yesterday is "chained", > > because it forces overflow flushers wait for free color and forces only one > > flusher for one color. > > > > Since "not chaining" is

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-26 Thread Tejun Heo
Hello, Lai. On Wed, Sep 26, 2012 at 12:48:59PM +0800, Lai Jiangshan wrote: > > Hmmm... so, that's a lot simpler. flush_workqueue() isn't a super-hot > > code path and I don't think grabbing mutex twice is too big a deal. I > > haven't actually reviewed the code but if it can be much simpler and

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-26 Thread Tejun Heo
Hello, Lai. On Wed, Sep 26, 2012 at 12:48:59PM +0800, Lai Jiangshan wrote: Hmmm... so, that's a lot simpler. flush_workqueue() isn't a super-hot code path and I don't think grabbing mutex twice is too big a deal. I haven't actually reviewed the code but if it can be much simpler and

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-26 Thread Tejun Heo
Hello, again. On Wed, Sep 26, 2012 at 09:49:58AM -0700, Tejun Heo wrote: The simple version of flush_workqueue() which I sent yesterday is chained, because it forces overflow flushers wait for free color and forces only one flusher for one color. Since not chaining is

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-25 Thread Lai Jiangshan
On 09/26/2012 04:24 AM, Tejun Heo wrote: > Hello, Lai. > > On Tue, Sep 25, 2012 at 05:02:43PM +0800, Lai Jiangshan wrote: >> It is not possible to remove cascading. If cascading code is >> not in flush_workqueue(), it must be in some where else. > > Yeah, sure, I liked that it didn't have to be

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-25 Thread Tejun Heo
Hello, Lai. On Tue, Sep 25, 2012 at 05:02:43PM +0800, Lai Jiangshan wrote: > It is not possible to remove cascading. If cascading code is > not in flush_workqueue(), it must be in some where else. Yeah, sure, I liked that it didn't have to be done explicitly as a separate step. > If you force

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-25 Thread Tejun Heo
Hello, Lai. On Tue, Sep 25, 2012 at 05:02:31PM +0800, Lai Jiangshan wrote: > I found the flush_workqueue() is not nature for me, especially I don't think it's natural for anybody. I'm not a big fan of that code either. > the usage of the colors and flush_workqueue_prep_cwqs(). > so I try to

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-25 Thread Lai Jiangshan
On 09/25/2012 04:39 AM, Tejun Heo wrote: > > I do like the removal of explicit cascading and would have gone that > direction if this code is just being implemented but I'm quite > skeptical whether changing over to that now is justifiable. Flush > bugs tend to be nasty and often difficult to

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-25 Thread Lai Jiangshan
On 09/25/2012 04:39 AM, Tejun Heo wrote: > Hello, Lai. > > On Mon, Sep 24, 2012 at 06:07:02PM +0800, Lai Jiangshan wrote: >> The core patch is patch6, it makes all flusher can start and the same time >> and allow us do more cleanup. >> >> Only patch1 and patch6 change the behavior of the code. >>

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-25 Thread Lai Jiangshan
On 09/25/2012 04:39 AM, Tejun Heo wrote: Hello, Lai. On Mon, Sep 24, 2012 at 06:07:02PM +0800, Lai Jiangshan wrote: The core patch is patch6, it makes all flusher can start and the same time and allow us do more cleanup. Only patch1 and patch6 change the behavior of the code. All other

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-25 Thread Lai Jiangshan
On 09/25/2012 04:39 AM, Tejun Heo wrote: I do like the removal of explicit cascading and would have gone that direction if this code is just being implemented but I'm quite skeptical whether changing over to that now is justifiable. Flush bugs tend to be nasty and often difficult to track

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-25 Thread Tejun Heo
Hello, Lai. On Tue, Sep 25, 2012 at 05:02:31PM +0800, Lai Jiangshan wrote: I found the flush_workqueue() is not nature for me, especially I don't think it's natural for anybody. I'm not a big fan of that code either. the usage of the colors and flush_workqueue_prep_cwqs(). so I try to

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-25 Thread Tejun Heo
Hello, Lai. On Tue, Sep 25, 2012 at 05:02:43PM +0800, Lai Jiangshan wrote: It is not possible to remove cascading. If cascading code is not in flush_workqueue(), it must be in some where else. Yeah, sure, I liked that it didn't have to be done explicitly as a separate step. If you force

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-25 Thread Lai Jiangshan
On 09/26/2012 04:24 AM, Tejun Heo wrote: Hello, Lai. On Tue, Sep 25, 2012 at 05:02:43PM +0800, Lai Jiangshan wrote: It is not possible to remove cascading. If cascading code is not in flush_workqueue(), it must be in some where else. Yeah, sure, I liked that it didn't have to be done

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-24 Thread Tejun Heo
Hello, Lai. On Mon, Sep 24, 2012 at 06:07:02PM +0800, Lai Jiangshan wrote: > The core patch is patch6, it makes all flusher can start and the same time > and allow us do more cleanup. > > Only patch1 and patch6 change the behavior of the code. > All other patches do not change any behavior. It

[PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-24 Thread Lai Jiangshan
The core patch is patch6, it makes all flusher can start and the same time and allow us do more cleanup. Only patch1 and patch6 change the behavior of the code. All other patches do not change any behavior. Lai Jiangshan (10): workqueue: always pass flush responsibility to next workqueue:

[PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-24 Thread Lai Jiangshan
The core patch is patch6, it makes all flusher can start and the same time and allow us do more cleanup. Only patch1 and patch6 change the behavior of the code. All other patches do not change any behavior. Lai Jiangshan (10): workqueue: always pass flush responsibility to next workqueue:

Re: [PATCH 00/10] workqueue: restructure flush_workqueue() and start all flusher at the same time

2012-09-24 Thread Tejun Heo
Hello, Lai. On Mon, Sep 24, 2012 at 06:07:02PM +0800, Lai Jiangshan wrote: The core patch is patch6, it makes all flusher can start and the same time and allow us do more cleanup. Only patch1 and patch6 change the behavior of the code. All other patches do not change any behavior. It would