Re: [PATCH] make-cancel_rearming_delayed_work-reliable-fix

2007-05-08 Thread Jarek Poplawski
On Tue, May 08, 2007 at 04:02:21PM +0400, Oleg Nesterov wrote: > On 05/08, Jarek Poplawski wrote: > > > > On Mon, May 07, 2007 at 02:34:20PM +0400, Oleg Nesterov wrote: > > > On 05/07, Jarek Poplawski wrote: ... > I am strongly against adding many different variants of cancel_xxx(). > With this pat

Re: [PATCH] make-cancel_rearming_delayed_work-reliable-fix

2007-05-08 Thread Oleg Nesterov
On 05/08, Jarek Poplawski wrote: > > On Mon, May 07, 2007 at 02:34:20PM +0400, Oleg Nesterov wrote: > > On 05/07, Jarek Poplawski wrote: > ... > > I am not happy with the complication this patch adds, mostly > > I hate this smb_wmb() in insert_work(). I have an idea how to > > remove it later, but

Re: [PATCH] make-cancel_rearming_delayed_work-reliable-fix

2007-05-08 Thread Jarek Poplawski
On Mon, May 07, 2007 at 02:34:20PM +0400, Oleg Nesterov wrote: > On 05/07, Jarek Poplawski wrote: ... > I am not happy with the complication this patch adds, mostly > I hate this smb_wmb() in insert_work(). I have an idea how to > remove it later, but this needs another patch not related to > workq

Re: [PATCH] make-cancel_rearming_delayed_work-reliable-fix

2007-05-07 Thread Oleg Nesterov
On 05/07, Anton Vorontsov wrote: > > I guess pseudo code below is not that strange, but real usecase: > > probe() > { > INIT_DELAYED_WORK(...); > /* we're not issuing queue_delayed_work() in probe(), work will >* be started by interrupt */ > return; > } > > remove() > {

Re: [PATCH] make-cancel_rearming_delayed_work-reliable-fix

2007-05-07 Thread Anton Vorontsov
On Mon, May 07, 2007 at 02:34:20PM +0400, Oleg Nesterov wrote: > On 05/07, Jarek Poplawski wrote: > > > > There is a lot of new things in the final version of this > > patch. I guess, there was no such problem in the previous > > version. > > No, this is basically the same patch + re-check-cwq-aft

Re: [PATCH] make-cancel_rearming_delayed_work-reliable-fix

2007-05-07 Thread Oleg Nesterov
On 05/07, Jarek Poplawski wrote: > > There is a lot of new things in the final version of this > patch. I guess, there was no such problem in the previous > version. No, this is basically the same patch + re-check-cwq-after-lock, the latter is mostly needed to prevent racing with CPU-hotplug. > I

Re: [PATCH] make-cancel_rearming_delayed_work-reliable-fix

2007-05-07 Thread Jarek Poplawski
On Sun, May 06, 2007 at 01:32:13AM +0400, Oleg Nesterov wrote: > on top of > make-cancel_rearming_delayed_work-reliable-spelling.patch > > Add cpu-relax() into spinloops, and a comments update. > > Small note. The new implementation has another downside. Suppose that rearming > work->func()

[PATCH] make-cancel_rearming_delayed_work-reliable-fix

2007-05-05 Thread Oleg Nesterov
on top of make-cancel_rearming_delayed_work-reliable-spelling.patch Add cpu-relax() into spinloops, and a comments update. Small note. The new implementation has another downside. Suppose that rearming work->func() gets a preemtion after setting WORK_STRUCT_PENDING but before add_timer/__