Re: Improving accuracy of PHC readings

2018-10-23 Thread Miroslav Lichvar
On Fri, Oct 19, 2018 at 04:52:13PM +, Keller, Jacob E wrote: > > This should significantly improve the accuracy of the synchronization, > > reduce the uncertainty in the readings to less than a half or third, > > and also reduce the jitter as there are fewer register reads sensitive > > to the

Re: Improving accuracy of PHC readings

2018-10-23 Thread Miroslav Lichvar
On Mon, Oct 22, 2018 at 03:48:02PM -0700, Richard Cochran wrote: > On Fri, Oct 19, 2018 at 11:51:37AM +0200, Miroslav Lichvar wrote: > > The extra timestamp doesn't fit the API of the PTP_SYS_OFFSET ioctl, > > so it would need to shift the timestamp it returns by the missing > > intervals (assuming

Re: Improving accuracy of PHC readings

2018-10-22 Thread Richard Cochran
On Fri, Oct 19, 2018 at 04:52:13PM +, Keller, Jacob E wrote: > Nice! I think this is good. I'd love to see some data to back it up, but it > makes sense to me. +1

Re: Improving accuracy of PHC readings

2018-10-22 Thread Richard Cochran
On Fri, Oct 19, 2018 at 11:51:37AM +0200, Miroslav Lichvar wrote: > A solution to this would be a new driver function that wraps the > latching register read with readings of the system clock and return > three timestamps instead of one. For example: > > ktime_get_real_ts64(&sys_ts1); >

RE: Improving accuracy of PHC readings

2018-10-19 Thread Keller, Jacob E
> -Original Message- > From: netdev-ow...@vger.kernel.org [mailto:netdev-ow...@vger.kernel.org] On > Behalf Of Miroslav Lichvar > Sent: Friday, October 19, 2018 2:52 AM > To: netdev@vger.kernel.org > Cc: Richard Cochran ; Keller, Jacob E > > Subject: Improving

Improving accuracy of PHC readings

2018-10-19 Thread Miroslav Lichvar
I think there might be a way how we could significantly improve accuracy of synchronization between the system clock and a PTP hardware clock, at least with some network drivers. Currently, the PTP_SYS_OFFSET ioctl reads the system clock, reads the PHC using the gettime64 function of the driver, a