strange system clock issues
Ben Scott
dragonhawk at gmail.com
Wed Aug 26 22:59:18 EDT 2009
On Wed, Aug 26, 2009 at 9:08 PM, Ted Roche<tedroche at tedroche.com> wrote:
>> 0: 2321478409 local-APIC-edge timer
>> 20:43:02 up 26 days, 20:46, 1 user, load average: 0.00, 0.00, 0.00
>
> ((26 * 24 + 20) * 60 + 46) * 60 = 2321160 seconds
> 2321478409/2321160 ~= 1000
>
> I'd suspect the IRQ0 is firing closer to once per millisecond.
Hmmm, Google results suggest you are correct, at least for some kernels:
http://www.google.com/search?q=linux+%22system+timer%22+hz
I found a page which states that the rate is programmable:
http://www.osdever.net/bkerndev/Docs/pit.htm
My guess is Linux changes it to achieve higher timer precision.
Interestingly, that page also states that the default rate is 18.222
Hz, not exactly 18 Hz. The author writes that one of his readers told
him that was done so that a 16-bit counter can hold one hour worth of
clock ticks. 60 * 60 = 3600 seconds per hour. 3600 * 18.222 =
65599.2 ticks per hour. That is pretty close; could be.
-- Ben
More information about the gnhlug-discuss
mailing list