From: Tejun Heo <tj@kernel.org>
To: sched-ext@lists.linux.dev
Cc: David Vernet <void@manifault.com>,
Andrea Righi <arighi@nvidia.com>,
Changwoo Min <changwoo@igalia.com>,
Emil Tsalapatis <emil@etsalapatis.com>,
David Dai <david.dai@linux.dev>,
linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>
Subject: [PATCHSET sched_ext/for-7.4] sched_ext: Add ops.sub_cid_sched_updated()
Date: Mon, 5 Oct 2026 07:55:17 -1000 [thread overview]
Message-ID: <20261005175520.2756986-1-tj@kernel.org> (raw)
Hello,
A parent sched that delegates cpus to sub-scheds has no way of telling how
much each delegatee is using them. A parent that sizes its delegations by
demand cannot measure it, and one that wants to hand a cid from one sub to
another cannot see which sub it would take the cid from.
Patch 1 adds ops.sub_cid_sched_updated(), invoked on a sched when what it
sees running on a cid changes: NONE when no task of its subtree runs there,
SELF for its own task, or a direct child's cgroup id. Changes inside a
child's subtree are not reported. The op costs one pointer compare per
context switch when the sched does not change and sits behind a static key
that is on only while a loaded sched implements the op.
Patch 2 sizes scx_qmap's cid range buffer for large machines and patch 3
makes it show the cid-time each participant actually used next to what the
partition allocated to it.
Based on sched_ext/for-7.4 (3521f92ddd5f).
This patchset contains the following 3 patches.
0001 sched_ext: Add ops.sub_cid_sched_updated() to report the sched running on a cid
0002 sched_ext: scx_qmap: Size the cid range buffer for large machines
0003 sched_ext: scx_qmap: Show actual cid use per participant
The patchset is also available in the following git branch:
git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git sub-cid-sched
diffstat follows. Thanks.
kernel/sched/ext/ext.c | 20 ++++-
kernel/sched/ext/internal.h | 29 +++++++
kernel/sched/ext/sub.c | 166 +++++++++++++++++++++++++++++++++++++++++
kernel/sched/ext/sub.h | 6 ++
kernel/sched/sched.h | 2 +
tools/sched_ext/scx_qmap.bpf.c | 87 ++++++++++++++++++++-
tools/sched_ext/scx_qmap.c | 42 +++++++++--
tools/sched_ext/scx_qmap.h | 11 +++
8 files changed, 352 insertions(+), 11 deletions(-)
--
tejun
next reply other threads:[~2026-10-05 17:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 17:55 Tejun Heo [this message]
2026-10-05 17:55 ` [PATCH 1/3] sched_ext: Add ops.sub_cid_sched_updated() to report the sched running on a cid Tejun Heo
2026-10-05 17:55 ` [PATCH 2/3] sched_ext: scx_qmap: Size the cid range buffer for large machines Tejun Heo
2026-10-05 17:55 ` [PATCH 3/3] sched_ext: scx_qmap: Show actual cid use per participant 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=20261005175520.2756986-1-tj@kernel.org \
--to=tj@kernel.org \
--cc=arighi@nvidia.com \
--cc=changwoo@igalia.com \
--cc=david.dai@linux.dev \
--cc=emil@etsalapatis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sched-ext@lists.linux.dev \
--cc=void@manifault.com \
/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
all inboxes | Powered by JetHome®