Re: [PATCH] cancel_delayed_work: use del_timer() instead of del_timer_sync()

2007-04-27 Thread Oleg Nesterov
On 04/27, Jarek Poplawski wrote: > > According to workqueue.h: > > /* > > * Kill off a pending schedule_delayed_work(). Note that the work callback > > * function may still be running on return from cancel_delayed_work(). Run > > * flush_workqueue() or cancel_work_sync() to wait on it. > > */

Re: [PATCH] cancel_delayed_work: use del_timer() instead of del_timer_sync()

2007-04-26 Thread Jarek Poplawski
On Thu, Apr 26, 2007 at 07:29:53PM +0400, Oleg Nesterov wrote: > On 04/26, Jarek Poplawski wrote: ... > > > This change should not make any visible difference for the callers, > > > otherwise it is buggy. > > > > IMHO, there is the same visible difference, > > as between del_timer and del_timer_sy

Re: [PATCH] cancel_delayed_work: use del_timer() instead of del_timer_sync()

2007-04-26 Thread Oleg Nesterov
On 04/26, Jarek Poplawski wrote: > > On Wed, Apr 25, 2007 at 04:52:14PM +0400, Oleg Nesterov wrote: > > > > > It seems this > > > change cannot do any harm, but anyway it could change a few > > > things, e.g. with current version of cancel_rearming_

Re: [PATCH] cancel_delayed_work: use del_timer() instead of del_timer_sync()

2007-04-26 Thread Jarek Poplawski
On Wed, Apr 25, 2007 at 04:52:14PM +0400, Oleg Nesterov wrote: > On 04/25, Jarek Poplawski wrote: > > > > On Wed, Apr 25, 2007 at 01:50:34AM +0400, Oleg Nesterov wrote: > > > del_timer_sync() buys nothing for cancel_delayed_work(), but it is less > > > efficient since it locks the timer uncondition

Re: [PATCH] cancel_delayed_work: use del_timer() instead of del_timer_sync()

2007-04-25 Thread Oleg Nesterov
On 04/25, Jarek Poplawski wrote: > > On Wed, Apr 25, 2007 at 01:50:34AM +0400, Oleg Nesterov wrote: > > del_timer_sync() buys nothing for cancel_delayed_work(), but it is less > > efficient since it locks the timer unconditionally, and may wait for the > > completion of the delayed_work_timer_fn().

Re: [PATCH] cancel_delayed_work: use del_timer() instead of del_timer_sync()

2007-04-25 Thread Jarek Poplawski
On Wed, Apr 25, 2007 at 01:50:34AM +0400, Oleg Nesterov wrote: > del_timer_sync() buys nothing for cancel_delayed_work(), but it is less > efficient since it locks the timer unconditionally, and may wait for the > completion of the delayed_work_timer_fn(). I'm not sure what is the main aim of this

Re: [PATCH] cancel_delayed_work: use del_timer() instead of del_timer_sync()

2007-04-25 Thread David Howells
Oleg Nesterov <[EMAIL PROTECTED]> wrote: > del_timer_sync() buys nothing for cancel_delayed_work(), but it is less > efficient since it locks the timer unconditionally, and may wait for the > completion of the delayed_work_timer_fn(). Okay, this patch seems to work for me, though I'm not using an