From: Thomas Gleixner <tglx@linutronix.de>
To: Mahesh Bandewar <maheshb@google.com>,
Netdev <netdev@vger.kernel.org>,
Linux <linux-kernel@vger.kernel.org>,
David Miller <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Arnd Bergmann <arnd@arndb.de>,
Sagi Maimon <maimon.sagi@gmail.com>
Cc: Jonathan Corbet <corbet@lwn.net>,
John Stultz <jstultz@google.com>,
Mahesh Bandewar <mahesh@bandewar.net>,
Mahesh Bandewar <maheshb@google.com>
Subject: Re: [PATCHv4 net-next] ptp/ioctl: support MONOTONIC_RAW timestamps for PTP_SYS_OFFSET_EXTENDED
Date: Wed, 08 May 2024 09:35:46 +0200 [thread overview]
Message-ID: <87fruspxgt.ffs@tglx> (raw)
In-Reply-To: <20240502211047.2240237-1-maheshb@google.com>
On Thu, May 02 2024 at 14:10, Mahesh Bandewar wrote:
> The ability to read the PHC (Physical Hardware Clock) alongside
> multiple system clocks is currently dependent on the specific
> hardware architecture. This limitation restricts the use of
> PTP_SYS_OFFSET_PRECISE to certain hardware configurations.
>
> The generic soultion which would work across all architectures
> is to read the PHC along with the latency to perform PHC-read as
> offered by PTP_SYS_OFFSET_EXTENDED which provides pre and post
> timestamps. However, these timestamps are currently limited
> to the CLOCK_REALTIME timebase. Since CLOCK_REALTIME is affected
> by NTP (or similar time synchronization services), it can
> experience significant jumps forward or backward. This hinders
> the precise latency measurements that PTP_SYS_OFFSET_EXTENDED
> is designed to provide.
This is really a handwavy argument.
Fact is that the time jumps of CLOCK_REALTIME caused by NTP (etc) are
rare and significant enough to be easily filtered out. That's why this
interface allows you to retrieve more than one sample.
Can you please explain which problem you are actually trying to solve?
It can't be PTP system time synchronization as that obviously requires
CLOCK_REALTIME.
Thanks,
tglx
next prev parent reply other threads:[~2024-05-08 7:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-02 21:10 [PATCHv4 net-next] ptp/ioctl: support MONOTONIC_RAW timestamps for PTP_SYS_OFFSET_EXTENDED Mahesh Bandewar
2024-05-07 8:42 ` Paolo Abeni
2024-05-08 4:44 ` Richard Cochran
2024-05-08 7:38 ` Thomas Gleixner
2024-05-10 4:07 ` Richard Cochran
2024-05-10 7:50 ` Thomas Gleixner
2024-05-10 16:45 ` Mahesh Bandewar (महेश बंडेवार)
2024-05-11 9:59 ` Thomas Gleixner
2024-05-09 2:48 ` Mahesh Bandewar (महेश बंडेवार)
2024-05-08 7:35 ` Thomas Gleixner [this message]
2024-05-09 2:53 ` Mahesh Bandewar (महेश बंडेवार)
2024-05-10 21:27 ` Yuliang Li
2024-08-22 12:26 ` Vadim Fedorenko
2024-08-29 10:54 ` Vadim Fedorenko
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=87fruspxgt.ffs@tglx \
--to=tglx@linutronix.de \
--cc=arnd@arndb.de \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jstultz@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mahesh@bandewar.net \
--cc=maheshb@google.com \
--cc=maimon.sagi@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.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).