Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jan 1996 12:32:12 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        davidg@Root.COM, uhclem@nemesis.lonestar.org
Cc:        freebsd-current@freebsd.org
Subject:   Re: any ideas about this crash?
Message-ID:  <199601310132.MAA05401@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>>   This Pentium internal timer is USELESS as a 
>>TOD timepiece!  Stop using it this way!   It is only good for relative
>>measurements within the processors realm.  
>>
>>Why give the Linux guys something else to razz us about? 

>   "USELESS" might be a little strong - it does have the merit of being a very
>fast, "accurate", and easy way to do time measurements. Unfortunately, it also

It needs to be accurate to about 1% or better for the time measurements to be
useful.

>has apparantly shown us that DELAY() has a bug of some kind as *all* of the
>machines I've tested come up with an incorrect calibration about 10% of the
>time I boot. The result it comes up with is actually wrong, too, as the
>statistics that the system generates later are clearly wrong (off by the same
>amount as the mis-calibration). It acts like some sort of rounding or
>arithmetic error that occurs during the calibration.

Which statistics?  The statistics clock uses the real time clock so it
isn't affected by misc-calibration.  The statistics counts are only used
as weights inside the kernel so only their relative values matter.
Everything depends on the accuracy of microtime(), which depended on the
accuracy of the calibration of the Pentium clock until Garrett changed
things a few hours ago.

I'm surprised that people don't notice the time being wrong more than
the boot message or statistics.  A 10% error is 2.4 hours/day.

Try profiling a kernel configured for high resolution profiling (config
-pp).  Then times are accumulated using cputime(), which uses
essentially the same method as DELAY() for reading the 8254 clock.
Consistent biases and invalid clock values should show up in the
statistics.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199601310132.MAA05401>