netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Cochran <richardcochran@gmail.com>
To: Miroslav Lichvar <mlichvar@redhat.com>
Cc: netdev@vger.kernel.org, Yangbo Lu <yangbo.lu@nxp.com>
Subject: Re: [PATCH net-next 5/5] ptp: start virtual clocks at current system time.
Date: Mon, 31 Jan 2022 08:32:40 -0800	[thread overview]
Message-ID: <20220131163240.GA22495@hoboy.vegasvil.org> (raw)
In-Reply-To: <Yfe4FPHbFjc6FoTa@localhost>

On Mon, Jan 31, 2022 at 11:21:08AM +0100, Miroslav Lichvar wrote:
> I tried to find the discussion around this decision, but failed. Do
> you have a link?

I'll dig it up for you.
 
> 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.

When the clock is off by 37 seconds, the user will likely post a vague
complaint to linuxptp-users asking why linuxptp doesn't handle leap
seconds.

I prefer the clarity of the first case.

Thanks,
Richard

  reply	other threads:[~2022-01-31 16:32 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-27 11:45 [PATCH net-next 0/5] Virtual PTP clock improvements and fix Miroslav Lichvar
2022-01-27 11:45 ` [PATCH net-next 1/5] ptp: unregister virtual clocks when unregistering physical clock Miroslav Lichvar
2022-01-27 23:58   ` Vinicius Costa Gomes
2022-01-31 10:07     ` Miroslav Lichvar
2022-01-31 12:41       ` Vladimir Oltean
2022-01-27 11:45 ` [PATCH net-next 2/5] ptp: increase maximum adjustment of virtual clocks Miroslav Lichvar
2022-01-27 11:45 ` [PATCH net-next 3/5] ptp: add gettimex64() to " Miroslav Lichvar
2022-01-27 11:45 ` [PATCH net-next 4/5] ptp: add getcrosststamp() " Miroslav Lichvar
2022-01-27 11:45 ` [PATCH net-next 5/5] ptp: start virtual clocks at current system time Miroslav Lichvar
2022-01-27 22:01   ` Richard Cochran
2022-01-31 10:21     ` Miroslav Lichvar
2022-01-31 16:32       ` Richard Cochran [this message]
2022-02-01  8:42         ` Miroslav Lichvar
2022-02-01 19:10           ` Richard Cochran
2022-02-01 19:03       ` Richard Cochran
2022-02-02  9:07         ` Miroslav Lichvar
2022-01-27 22:02 ` [PATCH net-next 0/5] Virtual PTP clock improvements and fix Richard Cochran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220131163240.GA22495@hoboy.vegasvil.org \
    --to=richardcochran@gmail.com \
    --cc=mlichvar@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=yangbo.lu@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).