tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: rfc: high-resolution timer framework

On Wed, Aug 06, 2008 at 01:36:45AM +0200, Joerg Sonnenberger wrote:
> On Wed, Aug 06, 2008 at 12:18:33AM +0100, David Laight wrote:
> > The 'timer wheel' implementation is very efficient for the majority of
> > timers, especially for 'guard' timers in protocol code that are started
> > and then usually cancelled (often almost immediately) and rarely expire.
> Independent of what to use, I think the behavior of constant cancelling
> the timer should be changed for most drivers. Even for time wheels it is
> cheaper to just keep the timer running.

No, you don't understand.

Typically you send a message and start a timer for the response.
When the response arrives the timer is cancelled.
If the timer expires the message is resent.

That tends to get repeated for EVERY data message.

If the OS timers don't support that mode of working (efficiently)
then EVERY such driver has to implement its own timer framework.


David Laight:

Home | Main Index | Thread Index | Old Index