On Wed, Mar 15, 2023 at 05:44:43PM +0100, Maciek Machnikowski wrote:
> If you start the synchronization process and see that it doesn't work
> correctly then, this cleanup will prevent leaving invalid timestamps in
> memory.

Ok, this would be a good reason to invalidate the sample. So, it's not
about the data getting stale (which should be detected by the consumer),
but rather about users expecting restart of the process to reset
everything.
> 
> If timestamps were correct, it doesn't matter only as long as no one
> else touches the clocks.

I think that is always the case. It's not related to the producer
exiting.

> If the NTP process restarts, gets the time from a different source, and
> returns to the stale timestamp (which will sit in memory forever) it may
> incorrectly interpret this value as the right one.

This can happen even without stopping phc2sys.

> It also may backfire on embedded systems that stop the clock when going
> to sleep. After resuming, the value kept in there will be incorrect as well.

Again, that's unrelated to the process exit. You could have a command
to drop old measurements after resuming, but restarting everything is
easier.

If you reword the commit message, I'm ok with it.

Thanks,

-- 
Miroslav Lichvar



_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to