[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <2288034e-7819-4327-852c-8c00b92a1493@amd.com>
Date: Tue, 3 Dec 2024 16:21:20 -0600
From: Mario Limonciello <mario.limonciello@....com>
To: Borislav Petkov <bp@...en8.de>
Cc: Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>,
Dave Hansen <dave.hansen@...ux.intel.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
"H . Peter Anvin" <hpa@...or.com>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@...r.kernel.org>, Perry Yuan <Perry.Yuan@....com>,
Shyam Sundar S K <Shyam-sundar.S-k@....com>
Subject: Re: [PATCH v2] x86/cpu: Enable SD_ASYM_PACKING for PKG domain on
systems with AMD preferred cores
On 12/3/2024 16:17, Borislav Petkov wrote:
> On Tue, Dec 03, 2024 at 04:02:29PM -0600, Mario Limonciello wrote:
>> Preferred core classifications are available on "non-heterogenous" designs
>> for a few generations. There isn't an indication they're supported which is
>> why amd_detect_prefcore() was made.
>
> Not surprised.
>
>> That's already called during the boot either way because that is used
>> to identify the boost numerator. The boolean value it finds is cached, and
>> the next call will use the cached value. So I don't expect this change
>> affects boot speed.
>
> So with this addition, amd_detect_prefcore() would get called *three* times
> where you need to call it exactly and only once. And all it gives you a one
> bit of information which states that the system has preferred cores.
>
> So why don't you define a synthetic X86_FEATURE:
>
> X86_FEATURE_AMD_PREFERRED_CORES
>
> run this code *once* and *early* enough so that every user can have the result
> ready, if you have preferred cores, do
>
> setup_force_cpu_cap(X86_FEATURE_AMD_PREFERRED_CORES)
>
> (it needs to run before alternatives) and then in each user, you do
>
> if (cpu_feature_enabled(X86_FEATURE_AMD_PREFERRED_CORES))
> /* do things */
>
> instead of what you have now?
>
> Thx.
>
Sure, that sounds reasonable, I'll try to find the most appropriate call
site for it.
Powered by blists - more mailing lists