On Mon, Aug 03, 2020 at 08:51:58PM +0300, Vladimir Oltean wrote:
> The current poll interval is enough to ensure that rising and falling
> edge events are not lost for a 1 PPS signal with 50% duty cycle.

> Fix that by taking the following measures:
> - Schedule the poll from a timer. Because we are really scheduling the
>   timer periodically, the extts events delivered to user space are
>   periodic too, and don't suffer from the "shift-to-the-right" effect.
> - Increase the poll period to 6 times a second. This imposes a smaller
>   upper bound to the shift that can occur to the delivery time of extts
>   events, and makes user space (ts2phc) to always interpret correctly
>   which events should be skipped and which shouldn't.
> - Move the SPI readout itself to the main PTP kernel thread, instead of
>   the generic workqueue. This is because the timer runs in atomic
>   context, but is also better than before, because if needed, we can
>   chrt & taskset this kernel thread, to ensure it gets enough priority
>   under load.

Makes sense to me.

Acked-by: Richard Cochran <richardcoch...@gmail.com>

Reply via email to