From: Richard Cochran <richardcochran@gmail.com>
To: Peter Hilber <quic_philber@quicinc.com>
Cc: linux-kernel@vger.kernel.org, virtualization@lists.linux.dev,
virtio-dev@lists.linux.dev, netdev@vger.kernel.org,
"Trilok Soni" <quic_tsoni@quicinc.com>,
"Srivatsa Vaddagiri" <quic_svaddagi@quicinc.com>,
"David S. Miller" <davem@davemloft.net>,
"Eugenio Pérez" <eperezma@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Andrew Lunn" <andrew+netdev@lunn.ch>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Jason Wang" <jasowang@redhat.com>,
"Paolo Abeni" <pabeni@redhat.com>,
"Shuah Khan" <shuah@kernel.org>,
"Xuan Zhuo" <xuanzhuo@linux.alibaba.com>,
linux-kselftest@vger.kernel.org, linux-api@vger.kernel.org,
"David Woodhouse" <dwmw2@infradead.org>,
"Ridoux, Julien" <ridouxj@amazon.com>,
"John Stultz" <jstultz@google.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Stephen Boyd" <sboyd@kernel.org>,
"Anna-Maria Behnsen" <anna-maria@linutronix.de>
Subject: Re: [RFC PATCH 1/2] ptp: add PTP_SYS_OFFSET_STAT for xtstamping with status
Date: Fri, 20 Dec 2024 07:19:52 -0800 [thread overview]
Message-ID: <Z2WLGHRdlsRpT6BL@hoboy.vegasvil.org> (raw)
In-Reply-To: <20241219204208.3160-2-quic_philber@quicinc.com>
On Thu, Dec 19, 2024 at 09:42:03PM +0100, Peter Hilber wrote:
> Ioctl PTP_SYS_OFFSET_PRECISE2 provides cross-timestamping of device time
> and system time. This can be used for virtualization where (virtualization)
> host and guest refer to the same clocksource. It may be preferred to
> indicate UTC time, rather than TAI. It is then useful to indicate when and
> how the host processes UTC leap seconds (stepping or smearing on leap
> seconds),
If the VM host provides TAI, then the guest may freely derive UTC and
leap seconds on its own. Whether to smear leap seconds or not is
properly an administrative configuration choice in the VM guest.
Leap seconds are scheduled to be deleted in 2036. If, between now and
then, another one occurs, it will be global event, not determined by a
VM host. The way you find out about leap seconds is through
networking using the NTP (or even just downloading the published list
once in a while). VM clients typically have networking, and so
they can learn about a leap second all by themselves.
> in particular if the guest is not guaranteed to have an
> up-to-date Time Zone Database or similar.
Time zones are not connected to leap seconds.
> Also, a host may have a notion of how accurate its clock is w.r.t. the
> hosts' reference clocks.
I'm opposed to having device drivers try to claim any kind of clock
quality. All of the clock control, servos, statistics, etc, are done
in user space, and so only user space software can generate meaningful
clock quality metrics. Putting some kind of hand wavy values into
kernel drivers is just plain wrong IMO.
Thanks,
Richard
next prev parent reply other threads:[~2024-12-20 15:19 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 20:42 [RFC PATCH 0/2] ptp: add PTP_SYS_OFFSET_STAT ioctl, support it in virtio_rtc Peter Hilber
2024-12-19 20:42 ` [RFC PATCH 1/2] ptp: add PTP_SYS_OFFSET_STAT for xtstamping with status Peter Hilber
2024-12-20 15:19 ` Richard Cochran [this message]
2024-12-23 18:13 ` Peter Hilber
2024-12-26 0:42 ` Richard Cochran
2025-01-02 16:11 ` Peter Hilber
2025-01-02 16:21 ` Richard Cochran
2025-01-06 17:46 ` Peter Hilber
2024-12-19 20:42 ` [RFC PATCH 2/2] virtio_rtc: Support PTP_SYS_OFFSET_STAT ioctl Peter Hilber
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=Z2WLGHRdlsRpT6BL@hoboy.vegasvil.org \
--to=richardcochran@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=anna-maria@linutronix.de \
--cc=davem@davemloft.net \
--cc=dwmw2@infradead.org \
--cc=edumazet@google.com \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=jstultz@google.com \
--cc=kuba@kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=mst@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=quic_philber@quicinc.com \
--cc=quic_svaddagi@quicinc.com \
--cc=quic_tsoni@quicinc.com \
--cc=ridouxj@amazon.com \
--cc=sboyd@kernel.org \
--cc=shuah@kernel.org \
--cc=tglx@linutronix.de \
--cc=virtio-dev@lists.linux.dev \
--cc=virtualization@lists.linux.dev \
--cc=xuanzhuo@linux.alibaba.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