lkml.org 
[lkml]   [2021]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next] ptp: add vclock timestamp conversion IOCTL
On Fri, Oct 08, 2021 at 09:13:58AM +0200, Sebastien Laveze wrote:
> Of course, so what tests and measurements can we bring on the table to
> convince you that it doesn't lead to chaos ?

So, to restate what I've said before, you cannot adjust both the
physical clock and the virtual clock at the same time.

Here is a simple example that has no solution, AFAICT.

- Imagine one physical and one virtual clock based on it.

- A user space program using the virtual clock synchronizes to within
100 nanoseconds of its upstream PTP Domain. So far, so good.

- Now a second program using the physical clock starts up, and
proceeds to measure, then correct the gross phase offset to its
upstream PTP Domain.

- The driver must now add, as your proposal entails, the reverse
correction into the virtual clock's timecounter/cyclecounter.

- However, this particular physical clock uses a RMW pattern to
program the offset correction.

- Boom. Now the duration of the RMW becomes an offset error in the
virtual clock. The magnitude may be microseconds or even
milliseconds for devices behind slow MDIO buses, for example.

End of story.

Thanks,
Richard


\
 
 \ /
  Last update: 2021-10-11 14:59    [W:0.129 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site