From: Hongyan Xia <hongyan.xia2@arm.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] Move uclamp to each sched_class
Date: Wed, 3 Jul 2024 11:07:46 +0100 [thread overview]
Message-ID: <cover.1719999165.git.hongyan.xia2@arm.com> (raw)
Hi. I only just started looking at sched_ext a couple of days ago so
feel free to correct me if sched_ext patches have different rules,
different cc's and different mailing lists than normal LKML.
This mini series delegates uclamp operations to each sched_class. The
problem with the current handling of uclamp is that it seems to be a
global thing but it conditions on sched_class->uclamp_enabled anyway, so
it is in fact already kind of sched_class-specific. So, remove
sched_class->uclamp_enabled and just let each class decide what to do.
More importantly, sched_ext no longer unconditionally follows the
existing uclamp implementation, but instead each custom scheduler
decides itself what to do. It can re-use the existing uclamp, ignore
uclamp completely, or have its own uclamp implementation.
Some simple testing with trace_printk() shows uclamp_rq_{inc,dec}() are
called successfully from a sched_ext scheduler:
[002] d..21 1016.017441: uclamp_rq_dec: sched_ext uclamp dec
[002] dN.21 1016.017456: uclamp_rq_inc: sched_ext uclamp inc
Hongyan Xia (2):
sched/uclamp: Delegate uclamp to each sched_class
sched/ext: Add BPF functions for uclamp inc and dec
kernel/sched/core.c | 14 ++------------
kernel/sched/ext.c | 16 ++++++++++++----
kernel/sched/fair.c | 6 ++----
kernel/sched/rt.c | 7 +++----
kernel/sched/sched.h | 15 +++++++++++----
tools/sched_ext/include/scx/common.bpf.h | 2 ++
6 files changed, 32 insertions(+), 28 deletions(-)
--
2.34.1
next reply other threads:[~2024-07-03 10:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 10:07 Hongyan Xia [this message]
2024-07-03 10:07 ` [PATCH 1/2] sched/uclamp: Delegate uclamp to each sched_class Hongyan Xia
2024-07-03 18:13 ` Tejun Heo
2024-07-03 10:07 ` [PATCH 2/2] sched/ext: Add BPF functions for uclamp inc and dec Hongyan Xia
2024-07-03 18:15 ` Tejun Heo
2024-07-03 19:49 ` Hongyan Xia
2024-07-03 18:13 ` [PATCH 0/2] Move uclamp to each sched_class Tejun Heo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1719999165.git.hongyan.xia2@arm.com \
--to=hongyan.xia2@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox