All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET sched_ext/for-7.3-arena-args] sched_ext: Convert arena-pointer interfaces to __arena arguments
@ 2026-08-12 21:16 Tejun Heo
  2026-08-12 21:16 ` [PATCH 1/3] sched_ext: Pass kernel arena pointers to ops_cid callbacks Tejun Heo
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tejun Heo @ 2026-08-12 21:16 UTC (permalink / raw)
  To: David Vernet, Andrea Righi, Changwoo Min
  Cc: Kumar Kartikeya Dwivedi, sched-ext, Emil Tsalapatis, linux-kernel

cid-form schedulers keep their data in the BPF arena, but the interfaces
that pass arena objects between the kernel and BPF predate the __arena
argument support that just landed in bpf-next: kfuncs took the pointers as
__ign scalars or verifier-checked buffers, and both sides rebased between
the address forms by hand.

Convert all of them to __arena arguments before cid-form schedulers start
seeing real use. The ops_cid set_cmask() and sub_caps_updated() callbacks
pass kernel arena addresses that the struct_ops trampoline converts, the
sub-cap kfuncs and scx_bpf_cid_override() receive rebased kernel pointers
directly, and the hand-rolled conversion helpers are removed. The BPF-side
declarations carry __arena-qualified pointers, so scx_qmap passes its arena
objects without casts.

The arena argument address translation is currently implemented only on
x86-64. cid-form schedulers using these interfaces load only there for now.

This patchset contains the following three patches:

 0001-sched_ext-Pass-kernel-arena-pointers-to-ops_cid-call.patch
 0002-sched_ext-Convert-sub-cap-kfuncs-to-__arena-cmask-ar.patch
 0003-sched_ext-Convert-scx_bpf_cid_override-to-__arena-ar.patch

and is based on sched_ext/for-7.3-arena-args (294d95ff251b), which is
for-7.3 with bpf-next d114bb989367 ("Merge branch
'add-arena-argument-support-to-kfuncs-and-struct_ops'") pulled in for the
__arena argument support. The patches are also available in the following
git branch:

 git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git arena-args

diffstat follows.

 kernel/sched/ext/arena.c                 |  3 +-
 kernel/sched/ext/cid.c                   | 60 +++++++++++++++-------------
 kernel/sched/ext/ext.c                   | 22 +++++------
 kernel/sched/ext/internal.h              | 19 ++-------
 kernel/sched/ext/sub.c                   | 53 ++++++++++++-------------
 kernel/sched/ext/types.h                 |  6 +--
 tools/sched_ext/include/scx/common.bpf.h | 11 +++---
 tools/sched_ext/include/scx/compat.bpf.h | 14 ++++---
 tools/sched_ext/scx_qmap.bpf.c           | 36 ++++++-----------
 tools/sched_ext/scx_qmap.c               | 68 +++++++++++++++++++-------------
 tools/sched_ext/scx_qmap.h               |  4 ++
 11 files changed, 148 insertions(+), 148 deletions(-)

--
tejun

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

end of thread, other threads:[~2026-08-12 21:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-12 21:16 [PATCHSET sched_ext/for-7.3-arena-args] sched_ext: Convert arena-pointer interfaces to __arena arguments Tejun Heo
2026-08-12 21:16 ` [PATCH 1/3] sched_ext: Pass kernel arena pointers to ops_cid callbacks Tejun Heo
2026-08-12 21:16 ` [PATCH 2/3] sched_ext: Convert sub-cap kfuncs to __arena cmask arguments Tejun Heo
2026-08-12 21:16 ` [PATCH 3/3] sched_ext: Convert scx_bpf_cid_override() to __arena array arguments Tejun Heo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.