From: "Wang, Yuan1" <yuan1.wang@intel.com>
To: David Woodhouse <dwmw2@infradead.org>,
Thomas Gleixner <tglx@kernel.org>,
John Stultz <jstultz@google.com>
Cc: Stephen Boyd <sboyd@kernel.org>,
Miroslav Lichvar <mlichvar@redhat.com>,
Rodolfo Giometti <giometti@enneenne.com>,
Richard Cochran <richardcochran@gmail.com>,
Jie Wang <jie.wang@intel.com>, Ryan Luu <rluu@amazon.com>,
Julien Ridoux <ridouxj@amazon.com>,
<linux-kernel@vger.kernel.org>, <nh-open-source@amazon.com>
Subject: Re: [PATCH v2 0/6] timekeeping: Reduce magnitude of ntp_error
Date: Mon, 9 Nov 2026 13:50:48 +0800 [thread overview]
Message-ID: <cea56196-29dc-4cc3-8e69-a31b4116ad6a@intel.com> (raw)
In-Reply-To: <20261106030856.2538039-1-dwmw2@infradead.org>
On 11/6/2026 11:08 AM, David Woodhouse wrote:
> From: David Woodhouse <dwmw@amazon.co.uk>
>
>
> This turns out not to be theoretical: Jie Wang reports¹ that since the
> v7.3 accounting fixes, phc2sys takes minutes instead of seconds to
> settle CLOCK_REALTIME after a step of the PHC it follows, because its
> large frequency corrections are charged to ntp_error and repaid only
> through the dithering. Patch 1 of this series is the fix for that:
> Yuan Wang has measured it restoring their gPTP settling times (back to
> 32s from 200-400s or more) and withdrawn the RFC posted in that thread
> in its favour.
I tested v2 on top of v7.3 (Intel mainline-tracking v7.3; kernel/time
is identical to upstream v7.3), both the whole series and patch 1 on
its own.
Setup: two Intel i226 NICs back to back with gPTP (ptp4l + phc2sys on
each end), PREEMPT_RT, NO_HZ_FULL, HZ=1000, TSC. phc2sys reads the PHC
with PTP_SYS_OFFSET_PRECISE, so patch 6 is in the path. The
grandmaster's PHC is stepped by +1s three times, 400s apart. The
numbers are the time until the offset stays below 100ns:
GM phc2sys slave phc2sys slave ptp4l
v7.3 207/>361/>413s 114/79/293s 34-35s
v7.3 + v2 1/6 32/32/32s 40/41/41s 34-35s
v7.3 + v2 1-6/6 32/32/32s 41/41/40s 34-35s
">" means it had not settled before the next step.
With either kernel, the steady-state phc2sys lock is unchanged:
7-9ns rms and below 35ns peak on both ends, before the steps and in
the second half of each 400s window. There were no warnings in dmesg
and no ioctl errors from phc2sys.
I also ran adjtime(+5ms) with nothing else adjusting the clock and
measured the phase error left once the slew has finished. With patch
1 alone it was +1.5 to +8.4us over four runs. With the whole series it
was +0.47 and +0.61us over two runs, so patches 2-3 visibly help there
too.
For the whole series:
Tested-by: Yuan Wang <yuan1.wang@intel.com>
Thanks,
Yuan
prev parent reply other threads:[~2026-11-09 5:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-06 3:08 David Woodhouse
2026-11-06 3:08 ` [PATCH v2 1/6] timekeeping: Allow tick_length changes to apply mid-tick David Woodhouse
2026-11-06 3:08 ` [PATCH v2 2/6] ntp: Recalculate skew_delta when the phase offset changes David Woodhouse
2026-11-06 3:08 ` [PATCH v2 3/6] timekeeping: Bound idle sleep while a phase slew is in flight David Woodhouse
2026-11-06 3:08 ` [PATCH v2 4/6] timekeeping: Reinstate proportional correction of ntp_error David Woodhouse
2026-11-06 3:08 ` [PATCH v2 5/6] pps: Always use ktime_get_snapshot_id() for pps_get_ts() David Woodhouse
2026-11-06 8:44 ` Rodolfo Giometti
2026-11-06 3:08 ` [PATCH v2 6/6] timekeeping: Apply extrapolated ntp_error to clock snapshots David Woodhouse
2026-11-06 8:44 ` Rodolfo Giometti
2026-11-06 21:35 ` David Woodhouse
2026-11-06 3:24 ` [PATCH v2 0/6] timekeeping: Reduce magnitude of ntp_error David Woodhouse
2026-11-06 8:44 ` Rodolfo Giometti
2026-11-06 18:05 ` David Woodhouse
2026-11-09 5:50 ` Wang, Yuan1 [this message]
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=cea56196-29dc-4cc3-8e69-a31b4116ad6a@intel.com \
--to=yuan1.wang@intel.com \
--cc=dwmw2@infradead.org \
--cc=giometti@enneenne.com \
--cc=jie.wang@intel.com \
--cc=jstultz@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mlichvar@redhat.com \
--cc=nh-open-source@amazon.com \
--cc=richardcochran@gmail.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®