]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sched_ext: scx_qmap: move globals and cpu_ctx into a BPF arena map
authorTejun Heo <tj@kernel.org>
Thu, 16 Apr 2026 16:41:15 +0000 (06:41 -1000)
committerTejun Heo <tj@kernel.org>
Thu, 16 Apr 2026 17:31:07 +0000 (07:31 -1000)
commit60a59eaca71b0a8db299830da72d4c3effa78e79
tree7c2c6cddfafea8f54e1629f47c6fd08bb5fbeee6
parentac660979dfc43d84f703a566533edb8014b24f7b
sched_ext: scx_qmap: move globals and cpu_ctx into a BPF arena map

Arena simplifies verification and allows more natural programming.
Convert scx_qmap to arena as preparation for further sub-sched work.

Move scheduler state from BSS globals and a percpu array map
into a single BPF arena map. A shared struct qmap_arena is declared as
an __arena global so BPF accesses it directly and userspace reaches it
through skel->arena->qa.

Scheduling logic unchanged; only memory backing changes.

v2: Drop "mutable" from comments.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andrea Righi <arighi@nvidia.com>
Reviewed-by: Emil Tsalapatis <emil@etsalapatis.com>
tools/sched_ext/scx_qmap.bpf.c
tools/sched_ext/scx_qmap.c
tools/sched_ext/scx_qmap.h [new file with mode: 0644]