[PATCHSET sched_ext/for-6.11] sched_ext: Integrate with schedutil

From: Tejun Heo
Date: Tue Jun 18 2024 - 23:13:04 EST


sched_ext currently does not integrate with schedutil. When schedutil is the
governor, frequencies are left unregulated and usually get stuck close to
the highest performance level from running RT tasks.

This patchset integrates sched_ext with schedutil so that the BPF scheduler
can steer CPU frequencies when the schedutil governor is in use. The
implementation is straightforward. sugov_get_util() is updated to add the
BPF scheduler provided utilization metric when sched_ext is enabled.

This patchset is on top of sched_ext/for-6.11 (a5db7817af78 ("sched_ext: Add
selftests")) and contains the following two patches:

0001-cpufreq_schedutil-Refactor-sugov_cpu_is_busy.patch
0002-sched_ext-Add-cpuperf-support.patch

and is also available in the following git branch:

git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git scx-cpuperf

diffstat follows. Thanks.

kernel/sched/cpufreq_schedutil.c | 50 +++++++++-------
kernel/sched/ext.c | 83 ++++++++++++++++++++++++++
kernel/sched/ext.h | 9 ++
kernel/sched/sched.h | 1
tools/sched_ext/include/scx/common.bpf.h | 3
tools/sched_ext/scx_qmap.bpf.c | 142 +++++++++++++++++++++++++++++++++++++++++++++-
tools/sched_ext/scx_qmap.c | 8 ++
7 files changed, 270 insertions(+), 26 deletions(-)

--
tejun