summaryrefslogtreecommitdiff
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorJuan Martinez <juan.martinez@amd.com>2026-01-16 15:45:39 -0600
committerViresh Kumar <viresh.kumar@linaro.org>2026-01-27 11:21:23 +0530
commit94dbce6c13cd7634f9bdb402248991c95a8c3d57 (patch)
treea46706a5c78e8098dcd384efc5698231858191cc /drivers/cpufreq
parent8c376f337a7e31c42949247e24eaad9a30d6c62c (diff)
cpufreq/amd-pstate: Add comment explaining nominal_perf usage for performance policy
Add comment explaining why nominal_perf is used for MinPerf when the CPU frequency policy is set to CPUFREQ_POLICY_PERFORMANCE, rather than using highest_perf or lowest_nonlinear_perf. Signed-off-by: Juan Martinez <juan.martinez@amd.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/amd-pstate.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index c45bc98721d2..ec9f38b219de 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -636,6 +636,19 @@ static void amd_pstate_update_min_max_limit(struct cpufreq_policy *policy)
WRITE_ONCE(cpudata->max_limit_freq, policy->max);
if (cpudata->policy == CPUFREQ_POLICY_PERFORMANCE) {
+ /*
+ * For performance policy, set MinPerf to nominal_perf rather than
+ * highest_perf or lowest_nonlinear_perf.
+ *
+ * Per commit 0c411b39e4f4c, using highest_perf was observed
+ * to cause frequency throttling on power-limited platforms, leading to
+ * performance regressions. Using lowest_nonlinear_perf would limit
+ * performance too much for HPC workloads requiring high frequency
+ * operation and minimal wakeup latency from idle states.
+ *
+ * nominal_perf therefore provides a balance by avoiding throttling
+ * while still maintaining enough performance for HPC workloads.
+ */
perf.min_limit_perf = min(perf.nominal_perf, perf.max_limit_perf);
WRITE_ONCE(cpudata->min_limit_freq, min(cpudata->nominal_freq, cpudata->max_limit_freq));
} else {