[time-nuts] Linux timekeeping / jiffy source
Hal Murray
hmurray at megapathdsl.net
Fri Dec 3 07:22:32 UTC 2010
> Sync'ing to a local GPS locked NTP server, I see up to an 80 ppm spread
> between reboots, which I've documented at http://www.flatsurface.com/
> AMD_SB850/index.html . I'm running kernel 2.6.32 (Debian squeeze).
I'm not familiar with AMD, but there is a bug in the Intel world that matches
your symptoms.
The problem is in the TSC calibration routine. If you patch the source code
to call it multiple times and print each answer, you will get various
answers. They are all close enough that nobody but a time-nut or alert
sysadmin would notice. 80 ppm is the right ballpark for a "good" glitch.
I've seen bigger but don't have numbers handy. [I did that experiment a
while (months) ago and haven't rc-checked with a recent kernel.]
If you are willing to recompile your kernel, you can patch the source to use
a compiled in constant.
> I think that kernel timekeeping ("jiffies") are linked to the "8254" timer
> in the SB850 south bridge, but maybe it's the HPET in the 890FX north
> bridge. Anyone know how to tell which the kernel is using for timekeeping?
Somebody "cleaned up" the Linux timekeeping code a year or two ago. Scan
your /var/log/messages for something like:
Nov 7 08:40:13 shuksan klogd: Detected 2792.933 MHz processor.
and/or
Nov 7 08:40:14 shuksan klogd: Switching to clocksource tsc
If you boot several times, the bottom digits of your processor speed will
jump around. (They should track temperature.)
There are now several possible clock sources. Not all of them are available
on all CPUs. At boot time, you can select from the ones that your hardware
supports and were compiled into your kernel. Look in <kernel-sources>
/Documentation/kernel-parameters.txt and search for clocksource
You might be happier with one of the alternate clock sources. If you don't
reboot very often, maybe you can just live with it.
> Also, is it possible to restart the Linux kernel without a full reboot
> (avoiding BIOS initialization), to see if it's a kernel or BIOS issue?
I don't know how to do that.
> I haven't seen this inconsistency on previous Intel or Serverworks based
> motherboards, but I've seen this behavior on 890FX/SB850 motherboards from
> two different manufacturers (although I think both use Award BIOS).
Were they running recent kernels?
--
These are my opinions, not necessarily my employer's. I hate spam.
More information about the Time-nuts_lists.febo.com
mailing list