On Sat, Jun 30, 2012 at 3:58 AM, Hal Murray <[email protected]> wrote:
>> I'm curious if any don't simply step the clock.
>
> Back in 2005, I had a NetBSD system that stalled the clock for a second.
>  http://www.megapathdsl.net/~hmurray/leap-second/tsc.png
> There is a slight slope to the flat part of the line, so the clock isn't
> stopped, just ticking very slowly.

Thanks, nice work charting gettimeofday() against another scaled TSC.
A more portable approach might use getclock(CLOCK_MONOTONIC, ...)
instead of the x86 TSC.  You show two Linux kernels stepped at
precisely at 23:59:60 back to 23:59:59, while NetBSD 3 seems to have
stopped the normal advance of the clock at 0:00:01.5 for a second
(advancing some microscopic amount for each read of the clock during
that second as you describe).  I'm curious if NetBSD starts the
near-freeze right at that half-second mark or just sometime during the
second second of the new day.  And of course I'm still curious what
other platforms do in their kernel NTP extensions to apply the
inserted leap second.

I believe with the kernel loop discipline disabled, ntpd will step the
clock backward 1 second sometime in the first second (that is, ntpd's
once-per-second timer isn't aligned with the second in any way).
Except on Windows, where it will run the clock at half speed for one
SI second starting anywhere in that same first second of the day.
We'll see if theory matches practice.

Cheers,
Dave Hart
_______________________________________________
pool mailing list
[email protected]
http://lists.ntp.org/listinfo/pool

Reply via email to