Re: [GIT pull] ntp updates for 2.6.31

From: Martin Schwidefsky
Date: Wed Jun 24 2009 - 09:39:26 EST


On Wed, 24 Jun 2009 10:29:15 +0100
Alan Cox <alan@xxxxxxxxxxxxxxxxxxx> wrote:

> > At some point that stops being NTP. NTP has quite a bit of userland
> > policy for filtering and managing a number of different network clocks
> > (other ntp servers, PPS sources, etc).
> >
> > >From what you're describing (direct offset from a hardware time device
> > used to steer the clock directly in kernel), you might want to look at
> > the STP code in s390 (stp_sync_clock).
>
> And also hardware distributed timing systems like those that distribute a
> clock with ethernet signals.

The STP clock synchronization works below the kernel. Usually we don't
notice the clock drift at all, the kernel has the illusion of a perfect
clock. Only if the delta is over the clock synchronization tolerance
the hardware causes a machine check. Then it becomes the job of the
operating system to deal with the clock delta. The current Linux code
applies the offset to the hardware clock (which makes the TOD clock
non-monotonic) and applies the same offset to the base value
sched_clock_base_cc to even out the effect. Then a single shot
adjustment is passed to NTP to get the system time in sync with the
hardware clock again.

--
blue skies,
Martin.

"Reality continues to ruin my life." - Calvin.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/