mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Wang, Yuan1" <yuan1.wang@intel.com>
To: David Woodhouse <dwmw2@infradead.org>,
	Miroslav Lichvar <mlichvar@redhat.com>,
	John Stultz <jstultz@google.com>,
	Thomas Gleixner <tglx@kernel.org>
Cc: <jie.wang@intel.com>, <yifan2.li@intel.com>,
	<junxiao.chang@intel.com>, Stephen Boyd <sboyd@kernel.org>,
	Richard Cochran <richardcochran@gmail.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH 0/1] timekeeping: Don't charge NTP frequency changes to ntp_error
Date: Fri, 6 Nov 2026 09:58:33 +0800	[thread overview]
Message-ID: <f8eb574d-8dcb-444d-a26d-0b42edd9cad8@intel.com> (raw)
In-Reply-To: <d0fc242d799bf0165b6dd83ce2808acea14b4d32.camel@infradead.org>


On 11/6/2026 12:29 AM, David Woodhouse wrote:
>> Yeah, timekeeping_set_reference() doesn't care. It's going to reset
>> ntp_error *after* changing the tick_length anyway.
>>
>> I think your patch is functionally identical to the one I've already
>> posted in 
>> https://lore.kernel.org/all/20261001202134.33929-2-dwmw2@infradead.org/ ?
> Not *quite* functionally identical; I think your version misses the
> ntp_error updates that we *should* be doing, when tick_length changes
> while a skew is active? Mine compensates only for the tick_length part,
> which I think is correct?
Yes, you're right. When tick_length and the skew change in the same
update, mine skips charging the skew change as well, but it should
still be accounted. Yours only compensates for the tick_length part,
which is correct. Please drop my RFC.
> I'm due to send v2 of that series; please could you test that, and I'll
> add the appropriate Fixes: and Cc: stable with your Tested-by:.
Sure, I'll test v2 when it's out and reply there.

In the meantime, here are the results for patch 1 of v1 on its own, on
top of v7.3 (Intel mainline-tracking v7.3; kernel/time is identical to
upstream v7.3). The setup is the same as in my RFC: two Intel i226
NICs back to back with gPTP (ptp4l + phc2sys on each end),
PREEMPT_RT, HZ=1000, TSC. The grandmaster's PHC is stepped by +1s three
times, 400s apart. The numbers are the time until the phc2sys offset
stays below 100ns:

                                        GM phc2sys          slave phc2sys     slave ptp4l
  v7.3                              207/>361/>413s  114/79/293s      34-35s
  v7.3 + my RFC             32/32/32s             41/40/40s          34-35s
  v7.3 + your v1 1/5     32/32/32s             40/41/41s           34-35s

">" means it had not settled before the next step.

Before the steps, phc2sys holds about 8ns rms on both ends, the same

as without the patch.

Thanks

Yuan


      reply	other threads:[~2026-11-06  1:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-05  3:21 Yuan Wang
2026-11-05  3:21 ` [RFC PATCH 1/1] " Yuan Wang
     [not found] ` <cd23df8dde221a908233b5dfde548383991b4537.camel@amazon.co.uk>
2026-11-05 16:29   ` [RFC PATCH 0/1] " David Woodhouse
2026-11-06  1:58     ` 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=f8eb574d-8dcb-444d-a26d-0b42edd9cad8@intel.com \
    --to=yuan1.wang@intel.com \
    --cc=dwmw2@infradead.org \
    --cc=jie.wang@intel.com \
    --cc=jstultz@google.com \
    --cc=junxiao.chang@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mlichvar@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=sboyd@kernel.org \
    --cc=tglx@kernel.org \
    --cc=yifan2.li@intel.com \
    /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®