Re: HZ, preferably as small as possible

Mark Hahn
2002-07-12T01:28:48Z

> > > Why must HZ be the same as 'interrupts per second'?
> >
> > s/interrupts/scheduler calls/
>
> Uh, HZ is not scheduler calls per second.
>
> Neither exactly is it interrupts per second, but _timer_ interrupts per
> second. It is the frequency of the timer interrupt.

is there really code which uses HZ which is not merely fiddling with jiffies?
that is, HZ is merely "jiffies per second". there's no reason the timer
(if any!) couldn't run faster than HZ, even at different ratios depending on
power level.

afaikt, jiffies has survived because there's a need for a
moderately fast, strictly monotonically increasing clock.
that doesn't imply that the periodic timer needs to run at HZ
or even that such a clock exists (tickless).
just that the kernel promises to update jiffies at HZ,
even if that means HZ is 1M, and goes by jumps of 10K.