Re: [PATCH 4/5] timekeeping: Reinstate proportional correction of ntp_error

From: John Stultz

Date: Thu Oct 22 2026 - 17:09:53 EST


On Thu, Oct 1, 2026 at 1:21 PM David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:
>
> From: David Woodhouse <dwmw@xxxxxxxxxxxx>
>
> The ±1 mult dithering is sufficient to keep ntp_error at zero once
> it's already there, but it doesn't do much to reduce it once any
> significant ntp_error has accumulated (e.g. from frequency or phase
> adjustments) — it can typically only drain single-digit nanoseconds
> per second. Commit dc491596f639 ("timekeeping: Rework frequency
> adjustments to work better w/ nohz") removed a larger skew because in
> a tickless kernel, it would remain in effect for a full idle period
> and overshoot. Now that timekeeping_max_deferment() ensures that the
> system wakes at the top of the second when skew is active, the
> correction can be reinstated. If ntp_error exceeds an amount that a
> single ±1 change to mult can drain within a minute, add an
> additional bias to mult to close the gap.
>
> Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx>
> Assisted-by: LLM

I can't say I've totally wrapped my head around all the details in
this one, but at a high level it sounds reasonable and nothing is
obviously sticking out to me.

Acked-by: John Stultz <jstultz@xxxxxxxxxx>