]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpufreq/amd-pstate: Modify the min_perf calculation in adjust_perf callback
authorDhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Wed, 5 Feb 2025 11:25:14 +0000 (11:25 +0000)
committerMario Limonciello <mario.limonciello@amd.com>
Mon, 24 Feb 2025 00:54:56 +0000 (18:54 -0600)
commit6ceb877d5cecd5417d63239bf833a1cd5f8f271c
tree60e49bd0e50c0ec09fa62a176c0fd75d5dc9c36f
parentd082ecbc71e9e0bf49883ee4afd435a77a5101b6
cpufreq/amd-pstate: Modify the min_perf calculation in adjust_perf callback

Instead of setting a fixed floor at lowest_nonlinear_perf, use the
min_limit_perf value, so that it gives the user the freedom to lower the
floor further.

There are two minimum frequency/perf limits that we need to consider in
the adjust_perf callback. One provided by schedutil i.e. the sg_cpu->bw_min
value passed in _min_perf arg, another is the effective value of
min_freq_qos request that is updated in cpudata->min_limit_perf. Modify the
code to use the bigger of these two values.

Signed-off-by: Dhananjay Ugwekar <dhananjay.ugwekar@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Link: https://lore.kernel.org/r/20250205112523.201101-4-dhananjay.ugwekar@amd.com
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
drivers/cpufreq/amd-pstate.c