Re: [patch 00/43] ktimer reworked

From: Thomas Gleixner
Date: Thu Dec 01 2005 - 18:56:08 EST


On Thu, 2005-12-01 at 22:15 +0000, Christoph Hellwig wrote:
> On Thu, Dec 01, 2005 at 05:13:17PM -0500, Kyle Moffett wrote:
> > In this patch there are two ways of setting up code to run at some
> > point in the future: timers and timeouts.
> >
> > A timeout (like waiting for somebody to answer the phone) is
> > optimized to never happen (they will hopefully pick up first). If
> > everything works perfectly; it will be stopped before it has a chance
> > to go off.
> >
> > A timer (like a kitchen timer telling you the cookies are done) is
> > optimized to be added and sit around until it expires. You just
> > don't turn off the timer and take the cookies out before they are done.
>
> Heh, in my dumb non-native speaker mind I'd expectit the other way around,
> as in a timeout is expected to time out :) and a timer is expect to happen,
> as in say the timer the tells you your breakfast egg is ready.

Which is perfectly the point Kyle made.

The timer tells you that the cookies or your breakfast eggs are well
done. You put them out of the oven or the pot at exactly the time when
the timer event happens. You won't turn off the timer before your
cookies/eggs are done, because you want them well done.

The timeout you set up is to remind you to switch off the oven before
your kitchen starts to burn. This timeout is likely - not sure in your
personal case :) - to be cancelled because you did think about switching
off the oven in time. If you forgot it, it is not a big difference if
you get the reminder 5 minutes earlier or later.

In case of the egg / cookie timer the distcintion of 1 to 5 minutes
makes a big difference.

tglx


-
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/