[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2fed54f7-8e6a-4e33-ac4b-7a2a9c1387e6@amd.com>
Date: Mon, 24 Feb 2025 10:21:46 +0530
From: Dhananjay Ugwekar <Dhananjay.Ugwekar@....com>
To: Mario Limonciello <superm1@...nel.org>,
"Gautham R . Shenoy" <gautham.shenoy@....com>,
Perry Yuan <perry.yuan@....com>
Cc: "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 v4 03/19] cpufreq/amd-pstate: Drop min and max cached
frequencies
On 2/20/2025 2:32 AM, Mario Limonciello wrote:
> From: Mario Limonciello <mario.limonciello@....com>
>
> Use the perf_to_freq helpers to calculate this on the fly.
> As the members are no longer cached add an extra check into
> amd_pstate_update_min_max_limit().
Actually, we are adding the check in "amd_pstate_epp_update_limit"
and we are adding it to avoid unnecessary calls to
"amd_pstate_update_min_max_limit" if the cached limits are up to date.
Apart from that the patch looks good to me,
Reviewed-by: Dhananjay Ugwekar <dhananjay.ugwekar@....com>
Thanks,
Dhananjay
>
> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@....com>
> Signed-off-by: Mario Limonciello <mario.limonciello@....com>
> ---
> v4:
> * Avoid some unnecessary changes to amd_pstate_init_freq()
> * Add tag
> v3:
> * Fix calc error for min_freq
> v2:
> * Keep cached limits
> ---
> drivers/cpufreq/amd-pstate-ut.c | 14 +++++------
> drivers/cpufreq/amd-pstate.c | 43 +++++++++------------------------
> drivers/cpufreq/amd-pstate.h | 9 ++-----
> 3 files changed, 20 insertions(+), 46 deletions(-)
>
[Snip]> @@ -1550,7 +1528,8 @@ static int amd_pstate_epp_update_limit(struct cpufreq_policy *policy)
> struct amd_cpudata *cpudata = policy->driver_data;
> u8 epp;
>
> - amd_pstate_update_min_max_limit(policy);
> + if (policy->min != cpudata->min_limit_freq || policy->max != cpudata->max_limit_freq)
> + amd_pstate_update_min_max_limit(policy);
>
> if (cpudata->policy == CPUFREQ_POLICY_PERFORMANCE)
> epp = 0;
[Snip]
Powered by blists - more mailing lists