On Tue, May 13, 2025 at 05:12:54PM +0200, Thomas Gleixner wrote:
This series addresses the timekeeping part by utilizing the existing
timekeeping and NTP infrastructure, which has been prepared for
multi-instance in recent kernels.
This looks very interesting. I ran some quick tests and it seems to
work as expected from the user space point of view. I can enable the
clock and synchronize it to a PTP HW clock or the system REALTIME
clock. ADJ_TICK works too.
To get accuracy and stability comparable to CLOCK_REALTIME, there will
need to be some support for cross timestamping against CLOCK_REALTIME
and/or PTP HW clocks, e.g. a variant of the PTP_SYS_OFFSET_PRECISE and
PTP_SYS_OFFSET_EXTENDED ioctls where the target clock can be selected.
The "PTP" naming of these new clocks doesn't seem right to me though
and I suspect it would just create more confusion. I don't see
anything specific to PTP here. There is no timestamping of network
packets, no /dev/ptp device, no PTP ioctls. To me they look like
secondary or auxiliary system realtime clocks. I propose to rename
them from CLOCK_PTP0-7 to CLOCK_REALTIME2-9, CLOCK_AUXILIARY0-7, or
CLOCK_AUX0-7.
--
Miroslav Lichvar