[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z8aLmDL++IAZdlAZ@BLRRASHENOY1.amd.com>
Date: Tue, 4 Mar 2025 10:41:52 +0530
From: "Gautham R. Shenoy" <gautham.shenoy@....com>
To: Mario Limonciello <superm1@...nel.org>
Cc: Perry Yuan <perry.yuan@....com>,
Dhananjay Ugwekar <Dhananjay.Ugwekar@....com>,
"open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <linux-kernel@...r.kernel.org>,
"open list:CPU FREQUENCY SCALING FRAMEWORK" <linux-pm@...r.kernel.org>,
Mario Limonciello <mario.limonciello@....com>
Subject: Re: [PATCH v5 19/19] cpufreq/amd-pstate: Drop actions in
amd_pstate_epp_cpu_offline()
On Wed, Feb 26, 2025 at 01:49:34AM -0600, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello@....com>
>
> When the CPU goes offline there is no need to change the CPPC request
> because the CPU will go into the deepest C-state it supports already.
>
> Actually changing the CPPC request when it goes offline messes up the
> cached values and can lead to the wrong values being restored when
> it comes back.
>
> Instead drop the actions and if the CPU comes back online let
> amd_pstate_epp_set_policy() restore it to expected values.
>
> Reviewed-by: Dhananjay Ugwekar <dhananjay.ugwekar@....com>
> Signed-off-by: Mario Limonciello <mario.limonciello@....com>
> ---
> v5:
> * Reword commit message
> * Add tag
> ---
> drivers/cpufreq/amd-pstate.c | 9 +--------
> 1 file changed, 1 insertion(+), 8 deletions(-)
>
> diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c
> index 24a1f9e129b61..4a364ae9b56a1 100644
> --- a/drivers/cpufreq/amd-pstate.c
> +++ b/drivers/cpufreq/amd-pstate.c
> @@ -1580,14 +1580,7 @@ static int amd_pstate_epp_cpu_online(struct cpufreq_policy *policy)
>
> static int amd_pstate_epp_cpu_offline(struct cpufreq_policy *policy)
> {
> - struct amd_cpudata *cpudata = policy->driver_data;
> - union perf_cached perf = READ_ONCE(cpudata->perf);
> -
> - if (cpudata->suspended)
> - return 0;
> -
> - return amd_pstate_update_perf(policy, perf.lowest_perf, 0, perf.lowest_perf,
> - AMD_CPPC_EPP_BALANCE_POWERSAVE, false);
> + return 0;
LGTM
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@....com>
--
Thanks and Regards
gautham.
> }
>
> static int amd_pstate_epp_suspend(struct cpufreq_policy *policy)
> --
> 2.43.0
>
Powered by blists - more mailing lists