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 [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to