Correction to the above - the drift I observe is ~10 microseconds per second (10x larger than previously stated).
-Todd On Sat, Oct 15, 2022 at 2:37 PM todd freed <todd.fr...@gmail.com> wrote: > > Question about the technique for converting PHC timestamps into > monotonic deadlines. > > clock_gettime(CLOCK_MONOTONIC, t1); > clock_gettime(phc, t2); > clock_gettime(CLOCK_MONOTONIC, t3); > offset = ((t3 - t1) / 2) - t2 > > Using code like this, I seem to observe a drift of about ~1 > microsecond per second. That is, the offset from the system monotonic > clock to the PHC clock grows by ~1000 nanoseconds each second. > > That is not what I would expect .. both domains have nanosecond > precision. That's quite a lot of drift to compensate for. Any ideas? > > -Todd > > On Sun, Oct 2, 2022 at 1:07 PM Richard Cochran <richardcoch...@gmail.com> > wrote: > > > > On Sat, Oct 01, 2022 at 08:47:53PM -0700, todd freed wrote: > > > Could you say just a bit more about why it shouldn't be implemented? > > > > I'm only saying that the potential benefit is very meager and does not > > justify the implementation effort. > > > > > I'm a professional software engineer, and I had thought I might take a > > > look at implementing it myself. But if you wouldn't recommend such a > > > thing, I will avoid spending any time on it. > > > > Before you do anything, I recommend reading these threads from > > archives from 2016: > > > > 31.Aug'16 Kieran Tyrrell Re: [Linuxptp-users] one-shot alarm > > 31.Aug'16 To Kieran Tyrre └─> > > 31.Aug'16 Dale Smith ├─>Re: [Linuxptp-devel] [Linuxptp-users] > > one-shot alarm > > 09.Sep'16 Kieran Tyrrell └─>Re: [Linuxptp-users] one-shot alarm > > 09.Sep'16 Kieran Tyrrell [Linuxptp-devel] [PATCH] PTP subsystem: > > implement POSIX timer interface > > 12.Sep'16 To Kieran Tyrre └─> > > 12.Sep'16 Kieran Tyrrell ├─> > > 12.Sep'16 To Kieran Tyrre │ └─> > > 15.Sep'16 Kieran Tyrrell │ ├─> > > 15.Sep'16 To Kieran Tyrre │ │ └─> > > 15.Sep'16 Kieran Tyrrell │ │ └─> > > 18.Oct'16 Kieran Tyrrell │ └─>igb tsync int handler double > > acknowledge? (was: Re: [Linuxptp-devel] [PATCH] PTP subsystem: implement > > POSIX ti > > 18.Oct'16 To Kieran Tyrre │ └─>Re: [Linuxptp-devel] igb tsync > > int handler double acknowledge? (was: Re: [PATCH] PTP subsystem: implement > > PO > > 18.Oct'16 To Kieran Tyrre │ ├=>Re: igb tsync int handler > > double acknowledge? (was: Re: [Linuxptp-devel] [PATCH] PTP subsystem: > > implement > > 19.Oct'16 Keller, Jacob E │ └─>Re: [Linuxptp-devel] igb tsync > > int handler double acknowledge? (was: Re: [PATCH] PTP subsystem: implement > > 13.Sep'16 Kieran Tyrrell └─> > > 13.Sep'16 To Kieran Tyrre └─> > > 15.Sep'16 Kieran Tyrrell └─> > > 15.Sep'16 To Kieran Tyrre └─> > > 09.Sep'16 Kieran Tyrrell [Linuxptp-devel] [PATCH] igb: add timer > > (alarm) functionality > > 12.Sep'16 To Kieran Tyrre └─> > > 13.Sep'16 Kieran Tyrrell └─> > > 13.Sep'16 To Kieran Tyrre └─> > > 14.Sep'16 Kieran Tyrrell └─> > > 15.Sep'16 Kieran Tyrrell [Linuxptp-devel] [PATCH V2] ptp and igb: > > implement POSIX timer (alarm) > > 03.Oct'16 To Kieran Tyrre └─> > > 06.Dec'16 To Kieran Tyrre └─> > > > > Especially this last message ^^^ shows the poor performance of a PCIe card: > > > > TL;DR graph... > > > > https://linuxptp.sourceforge.net/phc-timer/phc-timer-vs-nanosleep.png > > > > Good luck, > > Richard > > _______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users