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.
Thx
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@xxxxxxx>
--
Thanks and Regards
gautham.