[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <094167fa-e4c8-42cd-8d28-d6423f86f597@amd.com>
Date: Fri, 6 Dec 2024 10:16:45 -0600
From: Mario Limonciello <mario.limonciello@....com>
To: "Gautham R. Shenoy" <gautham.shenoy@....com>
Cc: Perry Yuan <perry.yuan@....com>, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org, Dhananjay Ugwekar <Dhananjay.Ugwekar@....com>
Subject: Re: [PATCH 11/15] cpufreq/amd-pstate: Cache EPP value and use that
everywhere
On 12/6/2024 10:14, Gautham R. Shenoy wrote:
> Hello Mario,
>
> On Thu, Dec 05, 2024 at 04:28:43PM -0600, Mario Limonciello wrote:
>> Cache the value in cpudata->epp_cached, and use that for all callers.
>> As all callers use cached value merge amd_pstate_get_energy_pref_index()
>> into show_energy_performance_preference().
>>
>> Check if the EPP value is changed before writing it to MSR or
>> shared memory region.
>
> The patch looks ok to me. Just one comment below:
>
> [..snip..]
>
>> @@ -1610,6 +1591,8 @@ static int amd_pstate_epp_set_policy(struct cpufreq_policy *policy)
>>
>> cpudata->policy = policy->policy;
>>
>> + guard(mutex)(&amd_pstate_limits_lock);
>> +
>
> Shouldn't this hunk be a different patch. The changelog doesn't say
> anything about making amd_pstate_epp_update_limit() call while holding
> the amd_pstate_limits_lock.
I'll drop the hunk entirely. I'm intending an overhaul of all the mutex
handling code after this series is landed.
>
>
>> ret = amd_pstate_epp_update_limit(policy);
>> if (ret)
>> return ret;
>> --
>> 2.43.0
>>
>
> For the rest of the patch
>
> Reviewed-by: Gautham R. Shenoy <gautham.shenoy@....com>
Thx
>
> --
> Thanks and Regards
> gautham.
Powered by blists - more mailing lists