[PATCHSET v2 sched_ext/for-7.2] sched_ext: scx_qmap: Convert to BPF arena
From: Tejun Heo
Date: Thu Apr 16 2026 - 13:22:52 EST
Hello,
Arena simplifies verification and allows more natural programming. This
patchset converts scx_qmap to use BPF arena for all mutable state, as
preparation for further sub-sched work.
0001 Rename tctx to taskc for consistency.
0002 Move globals and cpu_ctx into arena.
0003 Move task_ctx into an arena slab with bpf_res_spin_lock.
0004 Replace FIFO queue maps with arena-backed doubly-linked lists.
v2:
- Drop "mutable" from comments (#2).
- Add task_ctx_t typedef for struct task_ctx __arena (#3, Emil).
- Remove duplicate QMAP_TOUCH_ARENA() in qmap_dump_task (#4, Andrea).
- Update file-level description for arena-backed lists (#4, Andrea).
v1: https://lore.kernel.org/r/20260416081626.1285617-1-tj@xxxxxxxxxx
Based on linus/master (1d51b370a0f8).
tools/sched_ext/include/scx/common.bpf.h | 4 +
tools/sched_ext/scx_qmap.bpf.c | 572 +++++++++++++++++++------------
tools/sched_ext/scx_qmap.c | 54 +--
tools/sched_ext/scx_qmap.h | 73 ++++
4 files changed, 465 insertions(+), 238 deletions(-)
Git tree: git://git.kernel.org/pub/scm/linux/kernel/git/tj/sched_ext.git qmap-arena-v2
--
tejun