Re: [PATCH] x86/tsc: Have tsc=recalibrate override things

From: Peter Zijlstra
Date: Mon Oct 30 2023 - 12:03:57 EST


On Mon, Oct 30, 2023 at 05:00:50PM +0100, Peter Zijlstra wrote:
> Hi,
>
> My brand-spanking new SPR supermicro workstation was reporting NTP
> failures:
>
> Oct 30 13:00:26 spr ntpd[3517]: CLOCK: kernel reports TIME_ERROR: 0x41: Clock Unsynchronized
> Oct 30 13:00:58 spr ntpd[3517]: CLOCK: time stepped by 32.316775
> Oct 30 13:00:58 spr ntpd[3517]: CLOCK: frequency error 41699 PPM exceeds tolerance 500 PPM
>
> CPUID provides:
>
> Time Stamp Counter/Core Crystal Clock Information (0x15):
> TSC/clock ratio = 200/2
> nominal core crystal clock = 25000000 Hz
> Processor Frequency Information (0x16):
> Core Base Frequency (MHz) = 0x9c4 (2500)
> Core Maximum Frequency (MHz) = 0x12c0 (4800)
> Bus (Reference) Frequency (MHz) = 0x64 (100)
>
> and the kernel believes this. Since commit a7ec817d5542 ("x86/tsc: Add
> option to force frequency recalibration with HW timer") there is the
> tsc=recalibrate option, which forces the recalibrate.
>
> This duely reports:
>
> Oct 30 12:42:39 spr kernel: tsc: Warning: TSC freq calibrated by CPUID/MSR differs from what is calibrated by HW timer, please check with vendor!!
> Oct 30 12:42:39 spr kernel: tsc: Previous calibrated TSC freq: 2500.000 MHz
> Oct 30 12:42:39 spr kernel: tsc: TSC freq recalibrated by [HPET]: 2399.967 MHz

Arjan, can you please escalate this to our supermicro contact?