Skip to content

Commit 898ef0f

Browse files
committed
Merge: cpufreq: intel_pstate: Update asym capacity for CPUs that were offline initially
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5935 JIRA: https://issues.redhat.com/browse/RHEL-68120 Build Info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=66095055 Tested: Successful platform test results on Intel (intel-arrowlake-h-01) system. commit 92447aa Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Date: Mon Nov 4 19:53:53 2024 +0100 cpufreq: intel_pstate: Update asym capacity for CPUs that were offline initially Commit 929ebc9 ("cpufreq: intel_pstate: Set asymmetric CPU capacity on hybrid systems") overlooked a corner case in which some CPUs may be offline to start with and brought back online later, after the intel_pstate driver has been registered, so their asymmetric capacity will not be set. Address this by calling hybrid_update_capacity() in the CPU initialization path that is executed instead of the online path for those CPUs. Note that this asymmetric capacity update will be skipped during driver initialization and mode switches because hybrid_max_perf_cpu is NULL in those cases. Fixes: 929ebc9 ("cpufreq: intel_pstate: Set asymmetric CPU capacity on hybrid systems") Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Link: https://patch.msgid.link/1913414.tdWV9SEqCh@rjwysocki.net Signed-off-by: Steve Best <sbest@redhat.com> Approved-by: Tony Camuso <tcamuso@redhat.com> Approved-by: David Arcari <darcari@redhat.com> Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com> Merged-by: Rado Vrbovsky <rvrbovsk@redhat.com>
2 parents a724fac + ee32a5e commit 898ef0f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/cpufreq/intel_pstate.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,6 +2261,11 @@ static void intel_pstate_get_cpu_pstates(struct cpudata *cpu)
22612261
} else {
22622262
cpu->pstate.scaling = perf_ctl_scaling;
22632263
}
2264+
/*
2265+
* If the CPU is going online for the first time and it was
2266+
* offline initially, asym capacity scaling needs to be updated.
2267+
*/
2268+
hybrid_update_capacity(cpu);
22642269
} else {
22652270
cpu->pstate.scaling = perf_ctl_scaling;
22662271
cpu->pstate.max_pstate = pstate_funcs.get_max(cpu->cpu);

0 commit comments

Comments
 (0)