Port-amd64 archive

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

Re: Time passing slowly



On Wed, 5 Oct 2016 10:29:48 -0400 (EDT)
Mouse <mouse%Rodents-Montreal.ORG@localhost> wrote:

> $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.

What does:

 sysctl kern.timecounter.choice

say?  I've got a few machines (same hardware) where I have to set: 

 kern.timecounter.hardware = hpet0

in /etc/sysctl.conf in order for it to keep time correctly.  (I don't
recall if it was fast or slow, or if the issue is fixed in 7.0, but I
know I needed that in order to keep the clock in sync...)

Later...

Greg Oster


Home | Main Index | Thread Index | Old Index