mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Rodolfo Giometti <giometti@enneenne.com>,
	Thomas Gleixner <tglx@kernel.org>,
	John Stultz <jstultz@google.com>
Cc: Stephen Boyd <sboyd@kernel.org>,
	Miroslav Lichvar <mlichvar@redhat.com>,
	Ryan Luu <rluu@amazon.com>, Julien Ridoux <ridouxj@amazon.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] [DO NOT MERGE] timekeeping: Apply extrapolated ntp_error to clock snapshots
Date: Mon, 05 Oct 2026 10:49:57 +0200	[thread overview]
Message-ID: <80DBB2AF-6C1D-43E2-BB1A-ADABACABE3FE@infradead.org> (raw)
In-Reply-To: <f432aee3-9bda-430c-9cb6-e35248c87b3d@enneenne.com>

On 5 October 2026 10:15:01 CEST, Rodolfo Giometti <giometti@enneenne.com> wrote:
>On 03/10/2026 00:47, David Woodhouse wrote:
>> On Fri, 2026-10-02 at 12:26 +0200, Rodolfo Giometti wrote:
>>>  
>>>> So I think we do need it, and my inclination is to hold off on enabling
>>>> CONFIG_NTP_PPS for tickless kernels until we do. But I'll defer to your
>>>> preference. If you want to merge it sooner on the basis that with a
>>>> 1PPS signal the system doesn't get to sleep for long *anyway*, I can do
>>>> another test run with just patches 1-4.
>>>>
>>>
>>> Yes, please do that run. This patch changes what PPS_FETCH returns to
>>> userspace, so it has to wait for the chrony and ntpd people anyway; if
>>> 1-4 alone are good enough at 1PPS I'd rather not tie the tickless
>>> enablement to it.
>> 
>> https://david.woodhou.se/ntptest-r64/rodolfo-14-tickless-1hz/
>> 
>> Fairly much identical to the full series running tickless, which was
>> https://david.woodhou.se/ntptest-r64/tickless-1hz/
>> 
>> And not really much worse than the tickful variant
>> https://david.woodhou.se/ntptest-r64/tickful-1hz/
>> 
>> The ntp_error isn't measured because it's the clean series and most of
>> the instrumentation is gone. I'll set the 5s pulse version running
>> overnight.
>> 
>> The series is also tested on four virtual machines on the same host,
>> tickful and tickless, patches vs. baseline. You can see the tickless
>> baseline wobble when the actual frequency changes, while the other
>> three remain stable. You can also see ntp_error on both baseline
>> kernels spiking during the initial sync.
>> https://david.woodhou.se/ntptest-virt/
>
>Thanks, that's convincing: with 1-4 alone tickless at 1Hz looks the
>same as with the full series, so I'm fine with the tickless enablement
>not depending on this patch. :-)
>
>Please put these numbers, and the 5s ones when you have them, in the commit
>message of the patch dropping !NO_HZ_COMMON.

Will do. I'll let these four patches progress at least to the point where they have stable commit IDs before doing so — I don't think there's any rush for the PPS change, as it's been quite a few years already :)

In the meantime since I'm working on the filtering. Mills's median-of-3 helps, but min-of-3 seems to work better for the frequency side, because late pulses are less believable than early ones, yet two late pulses out of three is enough to pollute the median. I won't subject you to stream-of-consciousness testing on those; my test candidates are doing full 24h runs while I'm at LPC this week.

As a parallel thread I'll also look at unconditionally using the existing (non-correcting) ktime_get_snapshot_id() so that we have the corresponding counter values, and an ioctl for reporting those to userspace alongside the ts_real. I am leaning towards using raw counter values even when an offset has been applied to the realtime value, but still vacillating a bit.

  reply	other threads:[~2026-10-05  8:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 20:21 [PATCH 0/5] timekeeping: Reduce magnitude of ntp_error David Woodhouse
2026-10-01 20:21 ` [PATCH 1/5] timekeeping: Allow tick_length changes to apply mid-tick David Woodhouse
2026-10-01 20:21 ` [PATCH 2/5] ntp: Recalculate skew_delta when the phase offset changes David Woodhouse
2026-10-01 20:21 ` [PATCH 3/5] timekeeping: Bound idle sleep while a phase slew is in flight David Woodhouse
2026-10-01 20:21 ` [PATCH 4/5] timekeeping: Reinstate proportional correction of ntp_error David Woodhouse
2026-10-05 10:04   ` Miroslav Lichvar
2026-10-05 13:17     ` David Woodhouse
2026-10-01 20:21 ` [PATCH 5/5] [DO NOT MERGE] timekeeping: Apply extrapolated ntp_error to clock snapshots David Woodhouse
2026-10-02  8:30   ` Rodolfo Giometti
2026-10-02  9:14     ` David Woodhouse
2026-10-02 10:26       ` Rodolfo Giometti
2026-10-02 22:47         ` David Woodhouse
2026-10-05  8:15           ` Rodolfo Giometti
2026-10-05  8:49             ` David Woodhouse [this message]
2026-10-05 10:15               ` Rodolfo Giometti
2026-10-05 10:49                 ` David Woodhouse

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80DBB2AF-6C1D-43E2-BB1A-ADABACABE3FE@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=giometti@enneenne.com \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlichvar@redhat.com \
    --cc=ridouxj@amazon.com \
    --cc=rluu@amazon.com \
    --cc=sboyd@kernel.org \
    --cc=tglx@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®