Re: [PATCH net-next v4] ptp: add Alibaba CIPU PTP clock driver
From: Wen Gu
Date: Thu Aug 21 2025 - 22:11:01 EST
On 2025/8/22 04:12, David Woodhouse wrote:
On Thu, 2025-08-21 at 13:05 -0700, Richard Cochran wrote:
On Fri, Aug 15, 2025 at 11:38:14AM -0700, Jakub Kicinski wrote:
Maybe it's just me, but in general I really wish someone stepped up
and created a separate subsystem for all these cloud / vm clocks.
They have nothing to do with PTP. In my mind PTP clocks are simple HW
tickers on which we build all the time related stuff. While this driver
reports the base year for the epoch and leap second status via sysfs.
Yeah, that is my feeling as well.
Agreed. While vmclock is presented as a PTP clock for compatibility,
it's more than that because it can do better than simply giving a
single precise point in time. It actually tells the guest the precise
relationship between the hardware counter and real time, much like the
private data structure exposed from the kernel to vDSO gettimeofday.
We should work on having the kernel consume that *directly* and feed
its CLOCK_REALTIME with it. Having hundreds of guests on the same host
all recalculate the same thing based on a set of points in time,
obtained through /dev/ptpX or otherwise, is just daft.
Hi David,
How does vmclock work in a bare‑metal scenario, given that there is no
guest–hypervisor architecture?
You mentioned "vmclock over PCI", do you mean passing a PCI device to the
bare‑metal? What is this PCI device, and which driver does it use?
Thanks.