Messages in this thread | | | Date | Wed, 24 Jun 2009 15:39:11 +0200 | From | Martin Schwidefsky <> | Subject | Re: [GIT pull] ntp updates for 2.6.31 |
| |
On Wed, 24 Jun 2009 10:29:15 +0100 Alan Cox <alan@lxorguk.ukuu.org.uk> 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.
| |