Re: [PATCH] add unschedule_delayed_work to the workqueue API

From: James Bottomley
Date: Mon Oct 18 2004 - 16:33:36 EST


On Mon, 2004-10-18 at 16:25, Andrew Morton wrote:
> James Bottomley <James.Bottomley@xxxxxxxxxxxx> wrote:
> >
> > I'm in the process of moving some of our scsi timers which do more work
> > than just a few lines of code into schedule_work() instead. The problem
> > is that the workqueue API lacks the equivalent of del_timer_sync().
>
> The usual way of doing this is:
>
> cancel_delayed_work(...);

That API doesn't seem to be in the vanilla kernel ... is it mm only?

> flush_workqueue(...);

Yes, but the flush_workqueue() has you waiting until every piece of work
on the workqueue has completed ... that creates an unacceptable delay in
the routine that wants it either cancelled or run.

James



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/