[time-nuts] sync computer clock ticks
David I. Emery
die at dieconsulting.com
Fri Jan 4 19:22:44 EST 2008
On Fri, Jan 04, 2008 at 10:28:33AM -0700, M. Warner Losh wrote:
> In message: <25630a120801040918x2203daebs7eb0de5f00ffc56c at mail.gmail.com>
> I have no experience with gige networks, but the best I've been able
> to do on 100baseT networks is 50us. I'm unsure what <1us
> synchronization really means, since that's starting to get below the
> level of system calls on fast machines.
My experience in the late 90s with syncing Linux was based on
using serial port 1 PPS interrupts with custom code in the kernel to
optimize the serial port modem interrupt path. Time stamps of this
interrupt versus the hardware based microclock (based on an incrementing
counter in the CPU) were used to drive the NTP PLL which computed the
frequency error and time offset for the kernel PLL.
I found the microclock readings of time of day on the 1 PPS were
usually within 1 us (there were a few late ones due to interrupt off
intervals of course). This was on fairly slow server class hardware
(Pentium Pro at 200 MHz).
On ethernet I would not expect that level of accuracy due to the
inherent CSMA/CD algorithm jitter... plus of course whatever the bridge
in the star hub introduces...
Obviously once one gets into the microsecond area one gets into
the world of software relativity where what one means by time of day
depends on where one is looking. What I was using to judge performance
was what an interrupt level call to microclock returned... but inside a
larger software system this will obviously be skewed by the various
calling delays to get to the kernel...
Dave Emery N1PRE/AE, die at dieconsulting.com DIE Consulting, Weston, Mass 02493
"An empty zombie mind with a forlorn barely readable weatherbeaten
'For Rent' sign still vainly flapping outside on the weed encrusted pole - in
celebration of what could have been, but wasn't and is not to be now either."
More information about the time-nuts