Re: [PATCH v4 2/4] pps: Drop the !NO_HZ_COMMON dependency from NTP_PPS
From: Rodolfo Giometti
Date: Wed Sep 30 2026 - 09:10:49 EST
Hi David,
On 30/09/2026 03:28, David Woodhouse wrote:
Ok, I have the series in the shape I want to test it now. I got caught
up in more side quests around minimising ntp_error, which aren't
*strictly* around hardpps or snapshots at all but it was annoying me.
https://git.infradead.org/?p=users/dwmw2/linux.git;a=shortlog;h=refs/heads/timekeeping
now has:
• timekeeping: Allow tick_length changes to apply mid-tick
(reduce a fairly gratuitous cause of ntp_error accumulation, when
we *account* for a rate change before it actually takes effect)
• timekeeping: Apply extrapolated ntp_error to clock snapshots
(you know this one; as discussed maybe it'll shift to later)
• timekeeping: Bound idle sleep while a phase slew is in flight
(even standard adjtime() was hosed for tickless and would keep
applying 500µs/s skew the whole time the system slept)
• timekeeping: Reinstate proportional correction of ntp_error
(because once I fix the above, we *can*)
• ntp: Recalculate skew_delta when the phase offset changes
(another gratuitous cause of ntp_error accumulation. If time_offset
goes away *while* we're skewing towards it, the continued skew
for the rest of the second is unwanted and goes to ntp_error.
Just... stop skewing!)
• arm64: Support inlined clocksource reads for the arch counter
(this seems like an oversight)
• timekeeping: Read the counter as early as possible in ktime_get_snapshot_id()
(as I said, those 20ns are in the noise... but you can have them
back anyway)
• pps: Drop the !NO_HZ_COMMON dependency from NTP_PPS
(Really, it isn't needed. This is working)
• pps: Always use ktime_get_snapshot_id() for pps_get_ts()
(I think I mostly eliminated ntp_error as a significant source of
discrepancies now, but this is still the right thing to do for
precision)
As you suggested on the 28th, wouldn't it be better to move "pps: Always
use ktime_get_snapshot_id() for pps_get_ts()" before "timekeeping: Apply
extrapolated ntp_error to clock snapshots"? So the PPS patch has no
visible effect on ts_real, and the change stays in the timekeeping
patch, where the chrony and ntpd people can judge it.
Ciao,
Rodolfo