lkml.org 
[lkml]   [2001]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] new, scalable timer implementation, smptimers-2.4.0-B1

On Wed, 31 Jan 2001, Daniel Phillips wrote:

> b) The current API looks like it was designed primarly with one-shot
> timers in mind. Most timers events are multishot (because
> sleep_on_timeout is better for most one-shot applications [...]

sleep_on_timeout() uses a one-shot timer internally.

but for 2.4, the changing of the timer interface is out of question. My
main goal was to achieve good SMP scalability with the existing interface.

i do not agree with passing the timer address instead of the ->data field.
It's one more dereference to use, for no particular reason. If you want to
get at the timer structure you can still do it by embedding it into a
structure:

struct foo {
...
timer_t timer;
...
}

and ->data will point to &foo.

with the timerlist lock being per-CPU, basically all lock contention has
been eliminated. So it's not a problem anymore to drop/reaquire the lock,
it's not more than a nicely cached, CPU-local variable.

Ingo

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

\
 
 \ /
  Last update: 2005-03-22 13:16    [W:0.047 / U:0.864 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site