Unknown mailing list, search.

Re: Efficient use of low-precision kernel timers

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Alan Stern <stern@...>
Cc: Oliver Neukum <oliver@...>, Kernel development list <linux-kernel@...>
Date: Tuesday, July 10, 2007 - 4:28 pm

Alan,

On Tue, 2007-07-10 at 14:59 -0400, Alan Stern wrote:

Hard to tell.


The insertion / deletion needs to take the timer->base->lock, but this
is cheap as long as the insert / cancel happens on the same CPU.

The other overhead which might be "visible" is when the timer needs to
be re-cascaded in the wheel. See the table below:

         100 250 1000 HZ
[1] 256   10    4   1 ms
[2]  64 2560 1024 256 ms
[3]  64  164   66  16  s
[4]  64  175   70  17  m
[5]  64  186   75  19  h

In the 250Hz case the timer < 1024ms is never re-cascaded. A timer <66s
is re-cascaded at max. once.

So I guess your frequent cancel/restart scheme is just fine. It does not
re-trigger any kind of hardware event and the insertion/deletion is
O(1).

The network code relies on this cheap mechanism on high loaded server
machines.

Hope that helps,

	tglx


-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Efficient use of low-precision kernel timers, Alan Stern, (Tue Jul 10, 2:59 pm)
Re: Efficient use of low-precision kernel timers, Thomas Gleixner, (Tue Jul 10, 4:28 pm)