All of lore.kernel.org
 help / color / mirror / Atom feed
* cancel_delayed_work and its use of del_timer_sync
@ 2009-08-24  6:19 Dmitry Torokhov
  2009-08-24 17:49 ` Oleg Nesterov
  2009-08-24 17:51 ` Oleg Nesterov
  0 siblings, 2 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2009-08-24  6:19 UTC (permalink / raw)
  To: Oleg Nesterov; +Cc: LKML

Hi Oleg,

I noticed that you went back and forth on using del_timer() vs.
del_timer_sync() in cancel_delayed_work(), finally settling on using
del_timer_sync(). I must say that the fact that cancel_delayed_work()
might sleep (given that there exists cancel_delayed_work_sync) catches a
few drivers writers by surprise. Moreover it makes delayed works
unsuitable in cases when we do want to cancel (so we can reschedule)
work in an interrupt context.

My question is if sleeping in cancel_delayed_work can be avoided or if
it is possible to have a reschedule_delayed_work() taht would do a
"soft" cancel and [re]submit the work. In the use cases I am concerned
about we don't really care if work is not reliably cancelled, we just
need to be able to schedule it earlier if it has already been scheduled
for execution in some point in the future.

Thanks!

-- 
Dmitry

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-08-24 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-24  6:19 cancel_delayed_work and its use of del_timer_sync Dmitry Torokhov
2009-08-24 17:49 ` Oleg Nesterov
2009-08-24 18:07   ` Dmitry Torokhov
2009-08-24 17:51 ` Oleg Nesterov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.