[ntp:questions] Re: what is the typical linux kernel clock like?

Moe Trin ibuprofin at painkiller.example.tld
Sat Feb 18 01:41:24 UTC 2006


On Thu, 16 Feb 2006, in the Usenet newsgroup comp.protocols.time.ntp, in article
<CM2dnZlRKqBfgGjenZ2dnUVZ_t6dnZ2d at comcast.com>, Richard B. Gilbert wrote:

>Thomas A. Horsley wrote:

>> I was mostly asking if linux clocks still suffer from missed time of day
>> interrupts.

When used with badly coded drivers that block interrupts, yes.

>> Will ntpd still flake out and have to start doing settimeofday calls if
>> lots of timer interrupts disappear because bad video drivers have
>> interrupts held off while rendering opengl teapots and such :-).

The usual solution is to identify those badly designed drivers and file
bug reports - as well as posting to the appropriate comp.os.linuxx.*
news group to warn others.

>With the clock interrupt running at 100HZ Linux can keep reasonably good
>time.  Setting a higher value of HZ will most likely expose everything
>that masks or disables interrupts and keep time rather badly!

And that has been a fairly well reported problem lately. I'm not sure
when this started, but you have a kernel compile-time option to run the
clock at 100 *or* 1000 Hz, and quite a number of distributions are
compiling their kernels with the 1000 Hz option selected. This gives
great resolution which may or may not be useful, but plays havoc with
timekeeping when using crap drivers.  There is a simple test to see
what your clock is doing. Run the commands

[compton ~]$ grep ' 0:' /proc/interrupts
 0: 3648330396   timer
[compton ~]$ grep ' 0:' /proc/interrupts
 0: 3648331355   timer
[compton ~]$

ten seconds apart, and note the difference in the count. Here, the
difference is about 1000, which means the clock is running at 100 Hz.

        Old guy




More information about the questions mailing list