From: Mario Limonciello <mario.limonciello@amd.com>
To: Marco Scardovi <scardracs@disroot.org>, kprateek.nayak@amd.com
Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org,
perry.yuan@amd.com, rafael@kernel.org, ray.huang@amd.com,
stuartmeckle@gmail.com, viresh.kumar@linaro.org,
wyes.karny@amd.com
Subject: Re: [PATCH v2 0/2] cpufreq/amd-pstate: Fix EPP initialization and add capability check
Date: Wed, 3 Jun 2026 13:08:56 -0500 [thread overview]
Message-ID: <bfa57f02-7005-4bca-aaac-d466e37fb662@amd.com> (raw)
In-Reply-To: <20260603120121.25772-1-scardracs@disroot.org>
On 6/3/26 06:56, Marco Scardovi wrote:
> Hi Prateek and all,
>
> before trying merging in @Mario's git il post the new patches with the
> changes you suggested. If something doesn't feel right let me know.
>
> This series addresses a boot-time performance regression on shared memory
> systems where the CPU gets stuck at the lowest non-linear frequency
> (1.7GHz), and adds proper EPP capability checks to prevent active mode from
> being incorrectly enabled on systems without EPP support.
>
> Patch 1 fixes the boot-time initialization regression by introducing an
> `epp_hw_programmed` flag in struct amd_cpudata to track whether EPP has
> been configured on the hardware. This bypasses a false cache hit on boot
> due to zero-initialized caching registers, ensuring that EPP and auto_sel
> are always written during CPU initialization, while still preserving the
> cache guard optimization for all subsequent runtime transitions.
>
> Patch 2 implements an EPP capability check at boot time using a new
> amd_pstate_epp_supported() helper, which queries the EPP performance
> capability on the first online CPU. If EPP is unsupported, the driver falls
> back to passive mode at boot, and rejects any subsequent runtime
> transitions to active mode.
>
> Changes in v2:
> - Patch 1: Rename `epp_initialized` to `epp_hw_programmed`, explicitly
> document the flag semantics, and add a comment documenting the EPP cache
> guard optimization behavior.
> - Patch 2: Add comments explaining the uniform CPU capability check on x86,
> handle EPP capability check errors robustly using a tri-state model (only
> treat -EOPNOTSUPP as unsupported, warn and assume supported for other
> errors to avoid false negatives), and reject runtime active mode transitions
> at sysfs store time (preventing the driver from being left in an
> unregistered state).
>
> Changes in v1:
> - Fix the boot-time CPPC EPP/auto_sel initialization regression in
> shmem_set_epp() using a state tracking flag while preserving runtime
> cache optimization.
> - Add an EPP capability check helper during initialization.
> - Fall back to passive mode at boot if EPP is not supported, and reject
> transitions to active mode at runtime if EPP is not supported.
>
> Marco Scardovi (2):
> cpufreq/amd-pstate: Fix EPP initialization for shared memory systems
> cpufreq/amd-pstate: Prevent active mode on systems without EPP support
>
> drivers/cpufreq/amd-pstate.c | 52 +++++++++++++++++++++++++++++++++++-
> drivers/cpufreq/amd-pstate.h | 2 ++
> 2 files changed, 53 insertions(+), 1 deletion(-)
>
Did you see Prateek's suggestion? Can you check if that helps before we
go down this path?
Thanks,
prev parent reply other threads:[~2026-06-03 18:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 8:19 [PATCH 0/1] cpufreq/amd-pstate: Prevent active mode on systems without EPP support Marco Scardovi
2026-06-03 8:19 ` [PATCH 1/1] " Marco Scardovi
2026-06-03 9:39 ` [PATCH 0/1] " K Prateek Nayak
2026-06-03 11:56 ` [PATCH v2 0/2] cpufreq/amd-pstate: Fix EPP initialization and add capability check Marco Scardovi
2026-06-03 11:56 ` [PATCH v2 1/2] cpufreq/amd-pstate: Fix EPP initialization for shared memory systems Marco Scardovi
2026-06-03 18:53 ` Mario Limonciello
2026-06-04 3:56 ` K Prateek Nayak
2026-06-04 6:56 ` Marco Scardovi
2026-06-04 18:43 ` Mario Limonciello
2026-06-05 3:41 ` K Prateek Nayak
2026-06-03 11:56 ` [PATCH v2 2/2] cpufreq/amd-pstate: Prevent active mode on systems without EPP support Marco Scardovi
2026-06-03 18:08 ` Mario Limonciello [this message]
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=bfa57f02-7005-4bca-aaac-d466e37fb662@amd.com \
--to=mario.limonciello@amd.com \
--cc=kprateek.nayak@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=perry.yuan@amd.com \
--cc=rafael@kernel.org \
--cc=ray.huang@amd.com \
--cc=scardracs@disroot.org \
--cc=stuartmeckle@gmail.com \
--cc=viresh.kumar@linaro.org \
--cc=wyes.karny@amd.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
Powered by JetHome