[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180412151926.GJ31379@localhost>
Date: Thu, 12 Apr 2018 17:19:26 +0200
From: Miroslav Lichvar <mlichvar@...hat.com>
To: Richard Cochran <richardcochran@...il.com>
Cc: Jesus Sanchez-Palencia <jesus.sanchez-palencia@...el.com>,
Thomas Gleixner <tglx@...utronix.de>, netdev@...r.kernel.org,
jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us,
vinicius.gomes@...el.com, anna-maria@...utronix.de,
henrik@...tad.us, John Stultz <john.stultz@...aro.org>,
levi.pearson@...man.com, edumazet@...gle.com, willemb@...gle.com
Subject: Re: [RFC v3 net-next 13/18] net/sched: Introduce the TBS Qdisc
On Thu, Apr 12, 2018 at 08:03:49AM -0700, Richard Cochran wrote:
> On Wed, Apr 11, 2018 at 04:38:44PM -0700, Jesus Sanchez-Palencia wrote:
> > Just breaking this down a bit, yes, TAI is the network time base, and the NICs
> > PTP clock use that because PTP is (commonly) based on TAI. After the PHCs have
> > been synchronized over the network (e.g. with ptp4l), my understanding is that
> > if applications want to use the clockid_t CLOCK_TAI as a network clock reference
> > it's required that something (i.e. phc2sys) is synchronizing the PHCs and the
> > system clock, and also that something calls adjtime to apply the TAI vs UTC
> > offset to CLOCK_TAI.
>
> Yes. I haven't seen any distro that sets the TAI-UTC offset after
> boot, nor are there any user space tools for this. The kernel is
> ready, though.
FWIW, the default NTP configuration in Fedora sets the kernel TAI-UTC
offset.
> > I was thinking about the full offload use-cases, thus when no scheduling is
> > happening inside the qdiscs. Applications could just read the time from the PHC
> > clocks directly without having to rely on any of the above. On this case,
> > userspace would use DYNAMIC_CLOCK just to flag that this is the case, but I must
> > admit it's not clear to me how common of a use-case that is, or even if it makes
> > sense.
>
> 1588 allows only two timescales, TAI and ARB-itrary. Although it
> doesn't make too much sense to use ARB, still people will do strange
> things. Probably some people use UTC. I am not advocating supporting
> alternate timescales, just pointing out the possibility.
There is also the possibility that the NIC clock is not synchronized
to anything. For synchronization of the system clock it's easier to
leave it free running and only track its phase/frequency offset to
allow conversion between the PHC and system time.
--
Miroslav Lichvar
Powered by blists - more mailing lists