mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ruka Yoshida <p5cn97m7@s.okayama-u.ac.jp>
To: Alexander Warth <alexander.warth@mailbox.org>
Cc: Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Borislav Petkov <bp@alien8.de>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	John Stultz <jstultz@google.com>, Stephen Boyd <sboyd@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86/tsc: Require a deviating refined calibration to be reproduced
Date: Fri, 4 Dec 2026 17:51:54 +0900	[thread overview]
Message-ID: <94734155-dc7f-4db6-a665-2f9ceff91c76@s.okayama-u.ac.jp> (raw)
In-Reply-To: <20261204072241.3374616-1-alexander.warth@mailbox.org>


On 2026-12-04 16:22, Alexander Warth wrote:
  > For a comparable result it would help most to test exactly the
  > failing configuration:
  > - warm reboot (not from power off)
  > - default C-states, HPET enabled (your 5/5 case)
  > - several boots, ideally as many as in your baseline

Hi Alexander,

Thank you for your reply.

I have completed the requested tests. The September 22 patch
applied to the Ubuntu 7.0.14-based kernel with offsets but
without any modifications to the patch itself.

I built both kernels from the same Ubuntu kernel source
(7.0.0-44.44~24.04.1) and performed five warm reboots with each,
alternating between the unpatched and patched kernels.

Test conditions:

      CPU: AMD Ryzen 9 5900HS (Zen 3, Cezanne)
      System: ASUS ROG Zephyrus G15 (GA503QR)
      BIOS: 418
      Microcode: 0xa500012
      CPUIdle driver: acpi_idle
      processor.max_cstate: 8 (default)
      ACPI C3: enabled
      HPET: enabled
      Clocksource watchdog: enabled
      Secure Boot: enabled
      Boot target: multi-user.target

The current clocksource was recorded after at least 60 seconds
of uptime for each boot.

      Test      Initial MHz  Refined MHz  Time (s)  Clocksource
      base-01      3293.985     3299.142  1.711535  hpet
      base-02      3293.779     3299.212  1.712557  hpet
      base-03      3293.898     3299.186  1.519328  hpet
      base-04      3294.105     3299.432  1.455297  hpet
      base-05      3293.985     3299.264  1.583556  hpet

      retry-01     3293.890     3293.796  2.618415  tsc
      retry-02     3294.040     3293.796  2.552665  tsc
      retry-03     3294.039     3293.806  2.750664  tsc
      retry-04     3293.751     3293.811  2.615436  tsc
      retry-05     3293.905     3293.797  2.550826  tsc

Without the patch, the watchdog marked the TSC unstable in
all five boots. With the patch, the TSC remained the active
clocksource in all five boots, with no TSC instability messages.

The mean timestamp of the refined calibration message changed
from 1.596455 to 2.617601 seconds, a difference of approximately
1.021 seconds.

The TSC frequency estimated from the watchdog intervals in the
five unpatched boots was between 3293.809 and 3293.811 MHz,
which supports your explanation of the failure.

  > With the patch, a boot where the refined value deviates should
  > log "Refined TSC calibration not reproducible"

I did not observe this message in any of the five patched boots.
Instead, all five completed the refined calibration with
frequencies between 3293.796 and 3293.811 MHz.

The approximately one-second delay is consistent with an
additional refinement measurement, although I have not directly
recorded the individual refinement samples.

The patch addresses the observed calibration failure under
these test conditions.

The requested timestamped dmesg logs and current clocksource
values for all ten boots are available at:

https://gist.github.com/mimoex/ebd2c8e788e4d9a1a71ad2958e388cf0

  > If the patch fixes it on your machine, would you be willing
  > to give a Tested-by: for v2?

Yes, I would be happy to test v2 and provide a Tested-by tag
after verifying that version on my system.

For transparency, I used ChatGPT to help write a script that
collects the requested diagnostic information and saves it
to text files. I reviewed the generated code and performed
all tests on my own hardware.

Best regards,
Ruka Yoshida


      reply	other threads:[~2026-12-04  8:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22  9:17 Alexander Warth
2026-10-03 22:07 ` NvD Ss
2026-10-04 11:55   ` Alexander Warth
2026-12-03  8:12 ` Ruka Yoshida
2026-12-04  7:22   ` Alexander Warth
2026-12-04  8:51     ` Ruka Yoshida [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=94734155-dc7f-4db6-a665-2f9ceff91c76@s.okayama-u.ac.jp \
    --to=p5cn97m7@s.okayama-u.ac.jp \
    --cc=alexander.warth@mailbox.org \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jstultz@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulmck@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=tglx@kernel.org \
    --cc=x86@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®