Re: [PATCH v7 1/1] pps: pps-gpio: split IRQ handler into hardirq timestamper + threaded handler
From: Sebastian Andrzej Siewior
Date: Tue Jun 02 2026 - 02:43:21 EST
On 2026-06-01 17:44:09 [-0700], Calvin Owens wrote:
> From: Michael Byczkowski <by@xxxxxxxxxxxx>
>
> Split the pps-gpio interrupt handler into a primary (hardirq) handler
> that captures the PPS timestamp at interrupt entry, and a threaded
> handler that processes the event. This produces the same two-part
> handler structure on both PREEMPT_RT and non-RT kernels.
>
> On non-RT kernels the threaded portion runs immediately after the
> primary, with no behavioral change compared to the previous
> single-handler implementation.
>
> On PREEMPT_RT, where interrupt handlers are force-threaded by default,
> the previous single-handler implementation captured the timestamp
> inside the threaded portion, after IRQ-thread scheduling delay. With
> the split, the timestamp is captured in true hardirq context as it is
> on non-RT kernels, eliminating a significant source of PPS jitter on
> RT systems.
>
> Tested-by: Michael Byczkowski <by@xxxxxxxxxxxx>
> Tested-by: Calvin Owens <calvin@xxxxxxxxxx>
> Acked-by: Rodolfo Giometti <giometti@xxxxxxxxxxxx>
> Signed-off-by: Michael Byczkowski <by@xxxxxxxxxxxx>
> Signed-off-by: Calvin Owens <calvin@xxxxxxxxxx>
> ---
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx>
Sebastian