[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220201190351.GA7009@hoboy.vegasvil.org>
Date: Tue, 1 Feb 2022 11:03:51 -0800
From: Richard Cochran <richardcochran@...il.com>
To: Miroslav Lichvar <mlichvar@...hat.com>
Cc: netdev@...r.kernel.org, Yangbo Lu <yangbo.lu@....com>
Subject: Re: [PATCH net-next 5/5] ptp: start virtual clocks at current system
time.
On Mon, Jan 31, 2022 at 11:21:08AM +0100, Miroslav Lichvar wrote:
> On Thu, Jan 27, 2022 at 02:01:16PM -0800, Richard Cochran wrote:
> > On Thu, Jan 27, 2022 at 12:45:36PM +0100, Miroslav Lichvar wrote:
> > > When a virtual clock is being created, initialize the timecounter to the
> > > current system time instead of the Unix epoch to avoid very large steps
> > > when the clock will be synchronized.
> >
> > I think we agreed that, going forward, new PHC drivers should start at
> > zero (1970) instead of TAI - 37.
>
> I tried to find the discussion around this decision, but failed. Do
> you have a link?
Here is one of the discussions. It didn't lay down a law or anything,
but my arguments still stand.
https://lore.kernel.org/all/20180815175040.3736548-1-arnd@arndb.de/
I've been pushing back on new drivers that use ktime_get isntead of
zero, but some still sneak through, now and again.
> To me, it seems very strange to start the PHC at 0. It makes the
> initial clock correction unnecessarily larger by ~7 orders of
> magnitude. The system clock is initialized from the RTC, which can
> have an error comparable to the TAI-UTC offset, especially if the
> machine was turned off for a longer period of time, so why not
> initialize the PHC from the system time? The error is much smaller
> than billions of seconds.
Who cares? The size of the error is irrelevant, because the initial
offset is wrong, and the action of the PTP will correct it, whether
large or small.
Thanks,
Richard
Powered by blists - more mailing lists