On Wed, Mar 15, 2023 at 12:55:56PM +0100, Maciek Machnikowski wrote:
> The SHM is not cleared upon servo release when exiting the tool. This leaves
> the last update in the shared memory region marked as valid. As a result, the
> NTP daemon starting later may consume stale data if the producer process
> exited.
> 
> To prevent such behavior - invalidate the SHM data when releasing the SHM 
> servo.

It probably doesn't matter much either way, but this doesn't seem
right to me. The sample stays valid after ptp4l/phc2sys exited. There
is a timestamp when the measurement was made. It's up to the consumer
to check if it's still acceptable.

The same situation happens when the servo stops due the port switching
to another PTP state without exiting. The last sample was made when
the source clock was considered synchronized and it can be used for
synchronization of the system clock.

-- 
Miroslav Lichvar



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

Reply via email to