Subject: Re: time runs at 1/5th speed
To: Martti Kuparinen <martti.kuparinen@iki.fi>
From: Frank Kardel <kardel@netbsd.org>
List: current-users
Date: 09/02/2006 14:14:27
Martti Kuparinen wrote:
> > > For i386, amd64, sparc, sparc64 and prep the time keeping code has
> been
> > > changed to
> > > FreeBSD's timecounters. Could you send me the /var/run/dmesg.boot
> file
> > > and the output
> > > of "sysctl kern.timecounter" ? There might be something different
> > > depending on which
> > > counter is picked and what counter frequency is assumed.
>
> VMware 3.2 on Linux, NetBSD 4beta. Full dmesg.boot is below.
>
> # sysctl kern.timecounter
> kern.timecounter.choice = clockinterrupt(q=0, f=100 Hz)
> TSC(q=-100, f=1813623160 Hz) piixpm0(q=1000, f=3579545 Hz)
> i8254(q=100, f=1193182 Hz) dummy(q=-1000000, f=1000000 Hz)
> # sysctl -w kern.timecounter.hardware=i8254
> kern.timecounter.hardware: piixpm0 -> i8254
>
> This makes "sleep 1" consistent with system time.
>
> # while :
> > do
> > date
> > sleep 1
> > done
> Fri Sep 1 16:23:53 EDT 2006
> Fri Sep 1 16:23:54 EDT 2006
> Fri Sep 1 16:23:55 EDT 2006
> ^C
> #
>
> With piixpm0, "sleep 1" is correct but system time is 30+ times
> too slow.
>
> # while :
> > do
> > date
> > sleep 1
> > done
> Fri Sep 1 16:27:38 EDT 2006
> Fri Sep 1 16:27:38 EDT 2006
> Fri Sep 1 16:27:38 EDT 2006
[...]
Well, looks like VMware emulates the powermanagement controller not like
the real hardware behaves. Try a kernel where piixpm and iic at piixpm
is unconfigured.
I see actually no added benefit in using piixpm in a VMware environment.
I'll make a mental note of piixpm counter misbehaving in VMware
environments.
Thanks for testing.
Frank