Re: [PATCH] x86/tsc: Require a deviating refined calibration to be reproduced

From: Ruka Yoshida

Date: Fri Dec 04 2026 - 03:52:01 EST



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