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

From: Krzysztof Halasa
Date: Thu Jul 14 2005 - 05:26:45 EST


Linus Torvalds <torvalds@xxxxxxxx> writes:

> And in short-term things, the timeval/jiffie conversion is likely to be a
> _bigger_ issue than the crystal frequency conversion.
>
> So we should aim for a HZ value that makes it easy to convert to and from
> the standard user-space interface formats. 100Hz, 250Hz and 1000Hz are all
> good values for that reason. 864 is not.

Probably only theoretical, and probably the hardware isn't up to it...
But what if we have:
- 64-bit jiffies done in hardware (a counter). 1 cycle = 1 microsecond
or even a CPU clock cycle. Can *APIC or another HPET do that?
- 64-bit "match timer" (i.e., a register in the counter which fires IRQ
when it matches the counter value)
- the CPU(s) sorting the timer list and programming "match timer" with
software timer next to be executed. Upon firing the timer, a new "next
to be executed" timer would be programmed into the counter's "match
timer".

We would have no timer ticks when nobody requested them - the CPUs would
be allowed to sleep for, say, even 50 ms when no task is RUNNING.
--
Krzysztof Halasa
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/