Patch "amd-pstate: Set min_perf to nominal_perf for active mode performance gov" has been added to the 6.6-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

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

to the 6.6-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     amd-pstate-set-min_perf-to-nominal_perf-for-active-m.patch
and it can be found in the queue-6.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3eb5e0305011570ce50f426ab769f7e7eee99d94
Author: Gautham R. Shenoy <gautham.shenoy@xxxxxxx>
Date:   Mon Oct 21 15:48:35 2024 +0530

    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: ffa5096a7c33 ("cpufreq: amd-pstate: implement Pstate EPP support for the AMD processors")
    Signed-off-by: Gautham R. Shenoy <gautham.shenoy@xxxxxxx>
    Reviewed-by: Mario Limonciello <mario.limonciello@xxxxxxx>
    Link: https://lore.kernel.org/r/20241021101836.9047-2-gautham.shenoy@xxxxxxx
    Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
index 8c16d67b98bfe..cdead37d0823a 100644
--- a/drivers/cpufreq/amd-pstate.c
+++ b/drivers/cpufreq/amd-pstate.c
@@ -1383,7 +1383,7 @@ static void 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);




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux