Port-amd64 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Time passing slowly



$WORK recently bought me a new work laptop.  Work needs it to be
running Linux, but it's got way more disk than work needs, so I started
to set it up to dual-boot (they're OK with that; I checked).

There were difficulties, but I finally have it running NetBSD (5.2, as
that's what I have handy - those without interest in NetBSD that old
may want to stop reading now).  It's running diskless at the moment.
But there's a peculiar issue:

[Pavilion - root] 37> date; sleep 10; date
Wed Oct  5 09:47:08 EDT 2016
Wed Oct  5 09:47:10 EDT 2016
[Pavilion - root] 38> 

It did sleep for ten wall-clock seconds, as near as I could tell
watching the clock on the screen (of a different, and well-behaved,
machine).  (In another test, "date; sleep 100; date" reported times
only 23 seconds apart.  Using /kern/time I can compute that sleep 10
takes 2.232134 seconds.)

Obviously something is wrong with timekeeping, but I'm not familiar
enough with the time code in the kernel to have much clue what could be
wrong to produce such a symptom.  It looks as though the tick size used
when computing ticks-to-sleep is correct, but the tick size used when
updating the time-of-day clock is wrong - but I thought those were the
same.

I did have to fiddle the kernel a little.  I disabled
ENHANCED_SPEEDSTEP, because it was crashing in est_something and it
looked complicated.  I increased MTRR_I686_NVAR_MAX (to 16) because 8
wasn't enough (the machine apparently has 10 - I changed the printf to
report the too-large value).  And I added an option (which I turned on)
to disable rdmsr(MSR_IA32_EXT_CONFIG), since it panics on the resulting
fault otherwise; I realize I may lose some-to-all of the temperature
reporting as a result.  But I don't _think_ any of those would lead to
timekeeping being wrong, much less this far wrong.

I don't suppose anyone has any pointers to useful pieces of the code
for me to look at?  I'm going to be digging into the timekeeping
myself, but I'm hoping someone remembers enough and is kind enough to
point me in likely-to-be-useful directions.

I can provide more information if anyone can tell me what information
would be useful.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index