mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCHSET sched_ext/for-7.4] sched_ext: Add ops.sub_cid_sched_updated()
@ 2026-10-05 17:55 Tejun Heo
  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
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tejun Heo @ 2026-10-05 17:55 UTC (permalink / raw)
  To: sched-ext
  Cc: David Vernet, Andrea Righi, Changwoo Min, Emil Tsalapatis,
	David Dai, linux-kernel, Tejun Heo

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-05 17:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-05 17:55 [PATCHSET sched_ext/for-7.4] sched_ext: Add ops.sub_cid_sched_updated() Tejun Heo
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

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®