[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.21.1811021225010.1895@nanos.tec.linutronix.de>
Date: Fri, 2 Nov 2018 12:25:56 +0100 (CET)
From: Thomas Gleixner <tglx@...utronix.de>
To: Miroslav Lichvar <mlichvar@...hat.com>
cc: John Stultz <john.stultz@...aro.org>,
Christopher Hall <christopher.s.hall@...el.com>,
"H. Peter Anvin" <hpa@...or.com>,
linux-rt-users <linux-rt-users@...r.kernel.org>,
jesus.sanchez-palencia@...el.com,
Gavin Hindman <gavin.hindman@...el.com>,
liam.r.girdwood@...el.com, Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: TSC to Mono-raw Drift
On Fri, 2 Nov 2018, Miroslav Lichvar wrote:
> On Thu, Nov 01, 2018 at 07:03:37PM +0100, Thomas Gleixner wrote:
> > On Thu, 1 Nov 2018, John Stultz wrote:
> > > On Thu, Nov 1, 2018 at 10:44 AM, Thomas Gleixner <tglx@...utronix.de> wrote:
> > > > On Tue, 23 Oct 2018, John Stultz wrote:
> > > >> However, to be correct, the ntp adjustments made would have to be made
> > > >> to both the base interval + error, which mucks the math up a fair bit.
> > > >
> > > > Hmm, confused as usual. Why would you need to do anything like that?
> > >
> > > Because the NTP adjustment is done off of what is now the raw clock.
> > > If the raw clock is "corrected" the ppb adjustment has to be done off
> > > of that corrected rate.
> >
> > Sure, but why would that require any change? Right now the raw clock is
> > slightly off and you correct clock monotonic against NTP. So with that
> > extra correction you just see a slightly different raw clock slew and work
> > from there.
>
> It makes sense to me.
>
> I think there are basically two different ways how it could be done.
> One is to correct the frequency of the raw clock, on which sits the
> mono/real clock. The other is to create a new raw clock which is
> separate from the mono/real clock, and add an offset to the NTP
> frequency to match the frequencies of the two clocks when not
> synchronized by NTP/PTP. The latter would provide a more stable
> mono/real clock.
>
> clocksource -> MONOTONIC_RAW -> MONOTONIC/REALTIME
>
> or
>
> clocksource -> ? -> MONOTONIC_RAW
> -> MONOTONIC/REALTIME
That's what we have now. At least I don't see how the raw thing is coupled
in NTP.
Thanks,
tglx
Powered by blists - more mailing lists