]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cpufreq/sched: Move cpufreq-specific EAS checks to cpufreq
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 6 May 2025 20:37:15 +0000 (22:37 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 May 2025 19:17:56 +0000 (21:17 +0200)
commit4854649b1fb43968615e0374d9d59580093ac67f
tree3d27c721054bd87c9814be807b94d3dbe27fac6b
parentf42c8556a0690802246dc588ae9c18184f71d8f5
cpufreq/sched: Move cpufreq-specific EAS checks to cpufreq

Doing cpufreq-specific EAS checks that require accessing policy
internals directly from sched_is_eas_possible() is a bit unfortunate,
so introduce cpufreq_ready_for_eas() in cpufreq, move those checks
into that new function and make sched_is_eas_possible() call it.

While at it, address a possible race between the EAS governor check
and governor change by doing the former under the policy rwsem.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Christian Loehle <christian.loehle@arm.com>
Tested-by: Christian Loehle <christian.loehle@arm.com>
Reviewed-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
Link: https://patch.msgid.link/2317800.iZASKD2KPV@rjwysocki.net
drivers/cpufreq/cpufreq.c
include/linux/cpufreq.h
kernel/sched/topology.c