[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YfjyX893NV2Hga35@localhost>
Date: Tue, 1 Feb 2022 09:42:07 +0100
From: Miroslav Lichvar <mlichvar@...hat.com>
To: Richard Cochran <richardcochran@...il.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 08:32:40AM -0800, Richard Cochran wrote:
> On Mon, Jan 31, 2022 at 11:21:08AM +0100, Miroslav Lichvar wrote:
> > 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.
>
> When the clock reads Jan 1, 1970, then that is clearly wrong, and so a
> user might suspect that it is uninititalized.
FWIW, my first thought when I saw the huge offset in ptp4l was that
something is horribly broken.
> I prefer the clarity of the first case.
I'd prefer smaller initial error and consistency. The vast majority of
existing drivers seem to initialize the clock at current system time.
Drivers starting at 0 now create confusion. If this is the right way,
shouldn't be all existing drivers patched to follow that?
--
Miroslav Lichvar
Powered by blists - more mailing lists