Re: [PATCH] 2.4: variable HZ

From: Willy Tarreau (willy@w.ods.org)
Date: Sat Oct 19 2002 - 04:36:10 EST


On Fri, Oct 18, 2002 at 03:38:43PM -0400, Richard B. Johnson wrote:
> If you are not using ELAN, CLOCK_TICK_RATE is 1193180.

well, in fact it's 1193181.666... (14318180/12).

> If your HZ is 100, you have 1193180/100 = 1193.18, not too exact.

you meant 1000, I suppose ?

> if you use 500, you get 1193180/500 = 2386.36 which has twice as much
> round-off. If you use 1193180/512 = 2330.43, even a higher fractional
> part.

those interested can try 511 Hz (/2334.994) or 1900 Hz (/627.990) which
has the double advantage of being multiple of 100 Hz and have a little
drift due to frac part (/628 gives 1899.97 Hz, and /627 gives 1903.001 Hz).
If you don't need a multiple of 100 Hz, I noticed that dividing by 5709
gives 209.0001 Hz.

I'm also wondering why we never use the RTC as an interrupt source. Are
there any incompatible PCs ?

Cheers,
Willy

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Oct 23 2002 - 22:00:46 EST