From: Dimitri Sivanich <sivanich@hpe.com>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Cc: "Jiri Wiesner" <jwiesner@suse.de>,
"Steve Wahl" <steve.wahl@hpe.com>,
"Justin Ernst" <justin.ernst@hpe.com>,
"Kyle Meyer" <kyle.meyer@hpe.com>,
"Russ Anderson" <russ.anderson@hpe.com>,
"Thomas Gleixner" <tglx@linutronix.de>,
"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>,
"Peter Zijlstra (Intel)" <peterz@infradead.org>,
"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Marco Elver" <elver@google.com>,
"Guilherme G. Piccoli" <gpiccoli@igalia.com>,
"Nikunj A Dadhania" <nikunj@amd.com>,
"Xin Li (Intel)" <xin@zytor.com>,
"Dimitri Sivanich" <dimitri.sivanich@hpe.com>
Subject: [PATCH v4 2/2] x86/tsc: Disable clocksource watchdog checking on recent and future UV platforms.
Date: Thu, 21 May 2026 08:23:18 -0500 [thread overview]
Message-ID: <ag8HRt1seqamvw1M@hpe.com> (raw)
In-Reply-To: <ag8F4Ja0Or808cr1@hpe.com>
HPE UV hardware and firmware is designed to ensure a reliable and
synchronized TSC mechanism. Comparing the TSC against secondary
clocksources can result in false positives due to variable access
latency caused by system traffic. The best course of action against
these false positives has been found to simply disable watchdog
checking of the TSC.
Commits [1] and [2] were introduced to avoid an issue where the TSC
is falsely declared unstable by exempting qualified platforms of up
to 4-sockets from TSC clocksource watchdog checking. Extend that
exemption to include recent and future UV platforms.
[1] 'commit b50db7095fe0 ("x86/tsc: Disable clocksource watchdog for TSC on qualified platorms")'
[2] 'commit 233756a640be ("x86/tsc: Extend watchdog check exemption to 4-Sockets platform")'
Signed-off-by: Dimitri Sivanich <sivanich@hpe.com>
---
arch/x86/kernel/tsc.c | 27 +++++++++++++++++++++------
1 file changed, 21 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index c5110eb554bc..08e8e5511749 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -32,6 +32,7 @@
#include <asm/i8259.h>
#include <asm/msr.h>
#include <asm/topology.h>
+#include <asm/uv/uv_hub.h>
#include <asm/uv/uv.h>
#include <asm/sev.h>
@@ -1228,6 +1229,20 @@ static void __init tsc_disable_clocksource_watchdog(void)
clocksource_tsc.flags &= ~CLOCK_SOURCE_MUST_VERIFY;
}
+static bool __init platform_is_exempt_from_watchdog(void)
+{
+ /* Platforms with no more than 4 packages are exempt */
+ if (topology_max_packages() <= 4)
+ return true;
+
+#ifdef CONFIG_X86_64
+ /* Recent UV systems are exempt */
+ if (is_uvy_hub())
+ return true;
+#endif
+ return false;
+}
+
static void __init check_system_tsc_reliable(void)
{
#if defined(CONFIG_MGEODEGX1) || defined(CONFIG_MGEODE_LX) || defined(CONFIG_X86_GENERIC)
@@ -1246,17 +1261,17 @@ static void __init check_system_tsc_reliable(void)
tsc_clocksource_reliable = 1;
/*
- * Disable the clocksource watchdog when the system has:
- * - TSC running at constant frequency
- * - TSC which does not stop in C-States
- * - the TSC_ADJUST register which allows to detect even minimal
+ * Disable the clocksource watchdog when the system:
+ * - has TSC running at constant frequency
+ * - has TSC which does not stop in C-States
+ * - has the TSC_ADJUST register which allows to detect even minimal
* modifications
- * - not more than four packages
+ * - is exempt from running the clocksource watchdog
*/
if (boot_cpu_has(X86_FEATURE_CONSTANT_TSC) &&
boot_cpu_has(X86_FEATURE_NONSTOP_TSC) &&
boot_cpu_has(X86_FEATURE_TSC_ADJUST) &&
- topology_max_packages() <= 4)
+ platform_is_exempt_from_watchdog())
tsc_disable_clocksource_watchdog();
}
--
2.43.0
next prev parent reply other threads:[~2026-05-21 13:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 13:17 [PATCH v4 0/2] x86/tsc: Exempt recent UV systems from clocksource watchdog checks to avoid false positives Dimitri Sivanich
2026-05-21 13:20 ` [PATCH v4 1/2] x86/platform/uv: Expose the uv_hub_type() interface Dimitri Sivanich
2026-05-21 13:23 ` Dimitri Sivanich [this message]
2026-05-21 19:30 ` [PATCH v4 0/2] x86/tsc: Exempt recent UV systems from clocksource watchdog checks to avoid false positives Thomas Gleixner
2026-05-22 2:08 ` Dimitri Sivanich
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=ag8HRt1seqamvw1M@hpe.com \
--to=sivanich@hpe.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=dimitri.sivanich@hpe.com \
--cc=elver@google.com \
--cc=gpiccoli@igalia.com \
--cc=hpa@zytor.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=justin.ernst@hpe.com \
--cc=jwiesner@suse.de \
--cc=kyle.meyer@hpe.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=nikunj@amd.com \
--cc=peterz@infradead.org \
--cc=russ.anderson@hpe.com \
--cc=steve.wahl@hpe.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
--cc=xin@zytor.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.