mirror of
https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10.git
synced 2026-09-09 00:07:04 +08:00
cpufreq: intel_pstate: Set non-turbo capacity to HWP_GUARANTEED_PERF()
JIRA: https://redhat.atlassian.net/browse/RHEL-212894
commit 27d80e0f8b8dff97503fc0061754b1d3800cb961
Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Date: Tue Jul 7 19:19:55 2026 +0200
cpufreq: intel_pstate: Set non-turbo capacity to HWP_GUARANTEED_PERF()
Setting cpu->capacity_perf to cpu->pstate.max_pstate_physical in the
"no turbo" case is inconsistent with what happens elsewhere in the
driver and causes arch_scale_cpu_capacity() to be incorrect. It also
skews arch_scale_freq_capacity() which ends up differing from 1024 for
the guaranteed P-state.
Address that by setting capacity_perf to HWP_GUARANTEED_PERF() in the
"no turbo" case.
Fixes: 929ebc93cc ("cpufreq: intel_pstate: Set asymmetric CPU capacity on hybrid systems")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Tested-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Cc: All applicable <stable@vger.kernel.org>
Link: https://patch.msgid.link/12928972.O9o76ZdvQC@rafael.j.wysocki
Signed-off-by: Steve Best <sbest@redhat.com>
This commit is contained in:
@@ -1058,12 +1058,14 @@ static void hybrid_clear_cpu_capacity(unsigned int cpunum)
|
||||
|
||||
static void hybrid_get_capacity_perf(struct cpudata *cpu)
|
||||
{
|
||||
u64 hwp_cap = READ_ONCE(cpu->hwp_cap_cached);
|
||||
|
||||
if (READ_ONCE(global.no_turbo)) {
|
||||
cpu->capacity_perf = cpu->pstate.max_pstate_physical;
|
||||
cpu->capacity_perf = HWP_GUARANTEED_PERF(hwp_cap);
|
||||
return;
|
||||
}
|
||||
|
||||
cpu->capacity_perf = HWP_HIGHEST_PERF(READ_ONCE(cpu->hwp_cap_cached));
|
||||
cpu->capacity_perf = HWP_HIGHEST_PERF(hwp_cap);
|
||||
}
|
||||
|
||||
static void hybrid_set_capacity_of_cpus(void)
|
||||
|
||||
Reference in New Issue
Block a user