Skip to content
Snippets Groups Projects
Commit d193e3cb authored by Gautham R. Shenoy's avatar Gautham R. Shenoy Committed by Greg Kroah-Hartman
Browse files

amd-pstate: Set min_perf to nominal_perf for active mode performance gov


[ Upstream commit 0c411b39e4f4ce8861301fa201cb4f817751311e ]

The amd-pstate driver sets CPPC_REQ.min_perf to CPPC_REQ.max_perf when
in active mode with performance governor. Typically CPPC_REQ.max_perf
is set to CPPC.highest_perf. This causes frequency throttling on
power-limited platforms which causes performance regressions on
certain classes of workloads.

Hence, set the CPPC_REQ.min_perf to the CPPC.nominal_perf or
CPPC_REQ.max_perf, whichever is lower of the two.

Fixes: ffa5096a ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors")
Signed-off-by: default avatarGautham R. Shenoy <gautham.shenoy@amd.com>
Reviewed-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20241021101836.9047-2-gautham.shenoy@amd.com


Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 50f0ec2f
No related branches found
No related tags found
1 merge request!176🤖 Sync Bot: Update v6.12-ktn to Latest Stable Kernel (v6.12.4)
......@@ -1513,7 +1513,7 @@ static int amd_pstate_epp_update_limit(struct cpufreq_policy *policy)
value = READ_ONCE(cpudata->cppc_req_cached);
if (cpudata->policy == CPUFREQ_POLICY_PERFORMANCE)
min_perf = max_perf;
min_perf = min(cpudata->nominal_perf, max_perf);
/* Initial min/max values for CPPC Performance Controls Register */
value &= ~AMD_CPPC_MIN_PERF(~0L);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment