Subject: Re: system timekeeping and CPU cycle counters
To: <>
From: David Laight <david@l8s.co.uk>
List: tech-kern
Date: 06/26/2005 08:39:22
On Sat, Jun 25, 2005 at 05:53:44PM -0700, Erik E. Fair wrote:
> 
> System clocks are also skewed over short intervals to cheaply reduce
> system-wide EMI/RFI:

I believe that 'spread spectrum' clocks have little or no effect on
the systems actual EMI/RFI emmissions, they do, however, make it
much harder for the measuring equipment used in test labs (which
are typically doing a scan through the frequency range) to detect
the emissions.
 
> Unfortunately, in the i386 port, NetBSD uses the TSC if it is present in
> microtime(9), unless the kernel config contains:

The problem is that the RTC chip has very slow access times (ISA bus
speeds) and it takes several cycles to obtain the counter - even when
the latch works correctly.

Christos and I did some testing to try to avoid clock-warp with the
RTC chip microtime/gettimeofday code, and made things somewhat better,
but failed to remove all the warping on one of his systems.

TSC based interval counting should be ok for measuring process cpu
usage (where it isn't necessary for the sum of the parts to add up
to wall clock time).

	David

-- 
David Laight: david@l8s.co.uk