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

From: Alexander Warth

Date: Fri Dec 04 2026 - 02:26:20 EST


On Thu, 3 Dec 2026 17:12:18 +0900, Ruka Yoshida wrote:
> I have reproduced what appears to be the same TSC calibration issue on
> an AMD Zen 3 system while investigating the reproducibility of
> post-quantum cryptographic benchmarks.

Hi Ruka,

thank you, this is very helpful. Yours is the third affected machine
in this thread and the first on Zen 3: mine is a Ryzen 5 PRO 2200GE on
an ASUS A320M-K, and the report from NvD Ss earlier in this thread is
a Ryzen 5 2400G on an ASUS A320M-C, both Zen 1.

> [0.000000] tsc: Detected 3294.109 MHz processor
> [1.712331] tsc: Refined TSC clocksource calibration: 3299.119 MHz
[...]
> The normal refined frequency is approximately 3293.812 MHz.

This is the same signature: the early estimate is close to the true
frequency, and only the refined calibration lands off, here by about
0.16%. The watchdog then sees the accumulated skew and marks the TSC
unstable. Warm boot only, cold boot clean, and the dependence on deep
C-states also match what I see.

> Is the September 22 patch still the preferred version for testing?

Yes, the September 22 posting is the current and only version on the
list. It was written against v7.3-rc3, applies without offsets to
v7.3, and to v6.18.52 with an 18-line offset, so a 7.0-based Ubuntu
tree should be fine. If it does not apply, let me know and I will send
a rebased version.

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

and to send for each boot:

dmesg | grep -Ei 'tsc|clocksource'
cat /sys/devices/system/clocksource/clocksource0/current_clocksource

With the patch, a boot where the refined value deviates should log
"Refined TSC calibration not reproducible" and keep the early
calibration, with tsc staying the clocksource.

If the patch fixes it on your machine, would you be willing to give a
Tested-by: for v2? I plan to post v2 with the additional systems in
the changelog.

Best regards,
Alexander