odegard Guru
Joined: 08 Mar 2003 Posts: 324 Location: Trondheim, NO
|
Posted: Fri Sep 15, 2006 4:58 pm Post subject: skewed clock? Using 2.6.18-rc4-something ? |
|
|
After a gazillion kernel recompiles, passing misc boot parameters in grub (noapictimer and friends) I finally found the solution to my ever racing clock!
I studied dmesg and saw this:
Code: |
time.c: Using 3.579545 MHz WALL PM GTOD PIT/TSC timer.
|
Intuition told me this might have something to do with the problem, so I googled it up and found this thread on lkml.org:
http://lkml.org/lkml/2006/8/20/162
Someone reported the exact same problem and after a while they(?) found out that the error is just 5 bytes of text in time.c.
Do this:
Code: |
nano /usr/src/linux/kernel/time/ntp.c
CTRL+W and search for this line:
define CLOCK_TICK_ADJUST (((s64)CLOCK_TICK_OVERFLOW * NSEC_PER_SEC) / CLOCK_TICK_RATE)
add the (s64)-part like this:
define CLOCK_TICK_ADJUST (((s64)CLOCK_TICK_OVERFLOW * NSEC_PER_SEC) / (s64)CLOCK_TICK_RATE)
go back to /usr/src/linux
recompile kernel. Remember make clean first.
|
My clock is now sane again. Supposedly it's a bug only affecting kernelversions 2.6.18-rc4-mm2, mm1 is fine or something like that, i.e. bad luck on my part.
Oh happy day!
keywords: clock time too fast racing skew |
|