From: Dave Hansen <dave.hansen@intel.com>
To: Dimitri Sivanich <sivanich@hpe.com>,
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: Re: [PATCH v3] x86/tsc: Disable clocksource watchdog for TSC on recent UV
Date: Tue, 7 Oct 2025 09:48:58 -0700 [thread overview]
Message-ID: <20264c7b-36dd-4fd3-a755-3f46584f37bc@intel.com> (raw)
In-Reply-To: <aOVAkYWjk+aWcM3F@hpe.com>
On 10/7/25 09:32, Dimitri Sivanich wrote:
> +static inline int is_uvx_hub(void) { return 0; }
> +static inline int is_uvy_hub(void) { return 0; }
> +static inline int is_uv_hub(void) { return 0; }
>
> #endif /* X86_UV */
>
> diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h
> index ea877fd83114..6e085ce8fc02 100644
> --- a/arch/x86/include/asm/uv/uv_hub.h
> +++ b/arch/x86/include/asm/uv/uv_hub.h
> @@ -246,6 +246,7 @@ static inline int is_uv5_hub(void) { return is_uv(UV5); }
> * then test if is UV4.
> */
>
> +#ifdef CONFIG_X86_UV
> /* UVX class: UV2,3,4 */
> static inline int is_uvx_hub(void) { return is_uv(UVX); }
>
> @@ -254,6 +255,7 @@ static inline int is_uvy_hub(void) { return is_uv(UVY); }
>
> /* Any UV Hubbed System */
> static inline int is_uv_hub(void) { return is_uv(UV_ANY); }
> +#endif
Defining those helpers across two different headers seems like a recipe
for pain.
I suspect a big chunk of those stubs (and their #ifdefs could completely
go away if you _just_ did:
#ifdef CONFIG_X86_UV
static inline int uv_hub_type(void)
{
return uv_hub_info->hub_type;
}
#else
static inline int uv_hub_type(void)
{
return 0;
}
#endif
In any case, this is precisely the kind of patch that would be best
refactored into two piece: one to expose the is_uv...() function and
another to actually use it.
Also, at this point, this:
> 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)
> + (topology_max_packages() <= 4 || is_uvy_hub()))
> tsc_disable_clocksource_watchdog();
has IMNHO gotten out of hand.
It should probably be:
if (boot_cpu_has(X86_FEATURE_CONSTANT_TSC) &&
boot_cpu_has(X86_FEATURE_NONSTOP_TSC) &&
boot_cpu_has(X86_FEATURE_TSC_ADJUST) &&
platform_is_exempt_from_watchdog())
tsc_disable_clocksource_watchdog();
In addition, 233756a640be talked quite a bit about *why* the 4-socket
line was chosen. This needs to have a similar explanation for UV systems.
next prev parent reply other threads:[~2025-10-07 16:49 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-07 16:32 [PATCH v3] x86/tsc: Disable clocksource watchdog for TSC on recent UV Dimitri Sivanich
2025-10-07 16:48 ` Dave Hansen [this message]
2025-10-07 17:42 ` Dimitri Sivanich
-- strict thread matches above, loose matches on Subject: below --
2025-08-20 19:54 Dimitri Sivanich
2025-09-11 13:21 ` 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=20264c7b-36dd-4fd3-a755-3f46584f37bc@intel.com \
--to=dave.hansen@intel.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=sivanich@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox