Re: [PATCH] i386: Selectable Frequency of the Timer Interrupt

Vojtech Pavlik
2005-07-14T12:13:54Z

On Thu, Jul 14, 2005 at 09:42:18AM +0200, Arjan van de Ven wrote:

> > IOW, nothing ever sees any "variable frequency", and there's never any
> > question about what the timer tick is: the timer tick is 2kHz as far as
> > everybody is concerned. It's just that the ticks sometimes come in
> > "bunches of 20".
>
> btw we can hide all of this a lot nicer from just about the entire
> kernel by reducing the usage of both HZ and jiffies in drivers/non
> platform code. That isn't hard; msleep() is a good step forward there
> already; the next step is a nicer api for add_timer/mod_timer that is
> both relative and in miliseconds; with those 2 the majority of code that
> has "knowledge" about this shrinks to near zero. Once we have that the
> actual implementation of this in the background matters a whole lot
> less.

A note on the relaive timer API: There needs to be a way to say
"x milliseconds from the time this timer should have triggered" instead
of "x milliseconds from now", to avoid skew in timers that try to be
strictly periodic.

But other than that - such an API would be a great thing for drivers.

--
Vojtech Pavlik
SuSE Labs, SuSE CR