Hi Kernel Team, I notice this today, when i restarted my laptop. TSC clock timer remain unstable. Kernel: 6.8.0 stable branch dmesg | grep clocksource [ 0.040122] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 2228124493813128 ns [ 0.106626] clocksource: hpet: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 133484873504 ns [ 0.113640] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x2f7a6d49d86, max_idle_ns: 440795363309 ns [ 0.281632] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 2227575962736136 ns [ 0.361893] clocksource: Switched to clocksource tsc-early [ 0.370526] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns [ 1.440817] tsc: Refined TSC clocksource calibration: 3293.826 MHz [ 1.440823] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x2f7a84671e2, max_idle_ns: 440795331774 ns [ 1.440852] clocksource: Switched to clocksource tsc [ 6.121459] clocksource: timekeeping watchdog on CPU11: Marking clocksource 'tsc' as unstable because the skew is too large: [ 6.121463] clocksource: 'hpet' wd_nsec: 501775644 wd_now: 524b545 wd_last: 4b714c3 mask: ffffffff [ 6.121466] clocksource: 'tsc' cs_nsec: 503497209 cs_now: d2656761b cs_last: cc37ccad6 mask: ffffffffffffffff [ 6.121468] clocksource: Clocksource 'tsc' skewed 1721565 ns (1 ms) over watchdog 'hpet' interval of 501775644 ns (501 ms) [ 6.121470] clocksource: 'tsc' is current clocksource. [ 6.121473] tsc: Marking TSC unstable due to clocksource watchdog [ 6.121612] clocksource: Checking clocksource tsc synchronization from CPU 6 to CPUs 0,9-12. [ 6.121664] clocksource: Switched to clocksource hpet DMI: ASUSTeK COMPUTER INC. ROG Zephyrus G14 GA401QM_GA401QM/GA401QM, BIOS GA401QM.415 08/11/2023 CPU: AMD Ryzen 9 5900HS with Radeon Graphics Unknown CPU @ 3.3GHz
Thank you for starting rework timer areas. https://lore.kernel.org/lkml/171011361729.2468526.2426064486971501672.tglx@xen13/
Created attachment 306767 [details] possible patch Can you see if perhaps this patch helps?
Hi Mario, I tested with your patch. And I think it's good now. This patch was used together with the 6.12.0-rc3+ base to verify. Now my laptop no longer reports this instability. Thank you.
Hi, Can you please share a log with 6.12-rc3 that reproduces issue without that patch and then another that it doesn't reproduce with 6.12-rc3 and just that patch applied?
Hello Mario, These days I don't have time to try to reproduce this problem. maybe next week I will try to add your patch over the base of -rc4 or -rc5 to check it again. But if there are other people, they can check it before me.
Thanks. The algorithm that has been used for TSC watchdog has changed in recent kernels, so it's very plausible that it's fixed already and the patch does not do anything.
I am still running into this on v6.13.1 on a Framework 13 AMD. Will try your patch.