From: Borislav Petkov <bp@alien8.de>
To: Mario Limonciello <mario.limonciello@amd.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
"maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<x86@kernel.org>, "H . Peter Anvin" <hpa@zytor.com>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)"
<linux-kernel@vger.kernel.org>, Perry Yuan <Perry.Yuan@amd.com>,
Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Subject: Re: [PATCH v2] x86/cpu: Enable SD_ASYM_PACKING for PKG domain on systems with AMD preferred cores
Date: Tue, 3 Dec 2024 23:17:46 +0100 [thread overview]
Message-ID: <20241203221746.GKZ0-Dii5rnZppkM_e@fat_crate.local> (raw)
In-Reply-To: <f71aff95-3aea-4681-9d35-9847b086cc8e@amd.com>
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.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2024-12-03 22:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 20:11 Mario Limonciello
2024-12-03 20:33 ` Peter Jung
2024-12-03 21:54 ` Borislav Petkov
2024-12-03 22:02 ` Mario Limonciello
2024-12-03 22:17 ` Borislav Petkov [this message]
2024-12-03 22:21 ` Mario Limonciello
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=20241203221746.GKZ0-Dii5rnZppkM_e@fat_crate.local \
--to=bp@alien8.de \
--cc=Perry.Yuan@amd.com \
--cc=Shyam-sundar.S-k@amd.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®