Skip to content

Commit 0c411b3

Browse files
gautshensuperm1
authored andcommitted
amd-pstate: Set min_perf to nominal_perf for active mode performance gov
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: ffa5096 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors") Signed-off-by: Gautham R. Shenoy <[email protected]> Reviewed-by: Mario Limonciello <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mario Limonciello <[email protected]>
1 parent b427ac4 commit 0c411b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/cpufreq/amd-pstate.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1535,7 +1535,7 @@ static int amd_pstate_epp_update_limit(struct cpufreq_policy *policy)
15351535
value = READ_ONCE(cpudata->cppc_req_cached);
15361536

15371537
if (cpudata->policy == CPUFREQ_POLICY_PERFORMANCE)
1538-
min_perf = max_perf;
1538+
min_perf = min(cpudata->nominal_perf, max_perf);
15391539

15401540
/* Initial min/max values for CPPC Performance Controls Register */
15411541
value &= ~AMD_CPPC_MIN_PERF(~0L);

0 commit comments

Comments
 (0)