Re: HZ, preferably as small as possible

Bernd Eckenfels
2002-07-12T02:58:58Z

In article <5.1.0.14.2.20020711201602.022387b0@whisper.qrpff.net> you wrote:
> Why must HZ be the same as 'interrupts per second'?

Well, it must not. But currently each timer interrupt the tick timestamp is
increased by one. So to find out how many seconds uptime you have (and other
things which are measured in timer ticks and passed to the userspace) you
need to know how many ticks have passed.

Actually there are a few things here, on the one hand, kernel should not
pass values in ticks to the userspace.

On the other hand having a changing HZ does not work for timespans measured
in those ticks, as long as those are not adjusted. One could think about
having a doze mode where only every 100th interruped is generated but it
increasedss the tick count by 100. Mst likely this will break a lot of
averaged measuring and stats counting, tough.

Greetings
Bernd