Skip to contentSkip to conversation

sched_ext: Documentation: update scx_qmap description for BPF arena

PATCH In review Cheng-Yang Chou 2 participants 2 messages Apr 18 – Apr 19

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sched_ext: Documentation: update scx_qmap description for BPF arena

Update scx_qmap documentation to reflect the switch from BPF_MAP_TYPE_QUEUE to BPF_MAP_TYPE_ARENA.

---
 Documentation/scheduler/sched-ext.rst | 2 +-
 tools/sched_ext/README.md             | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
Documentation/scheduler/sched-ext.rst +1 -1
index 03d595d178ea..ebe3b74094e8 100644
@@ -503,7 +503,7 @@ Where to Look
     custom DSQ.
 
   * ``scx_qmap[.bpf].c``: A multi-level FIFO scheduler supporting five
-    levels of priority implemented with ``BPF_MAP_TYPE_QUEUE``.
+    levels of priority implemented with ``BPF_MAP_TYPE_ARENA``.
 
   * ``scx_central[.bpf].c``: A central FIFO scheduler where all scheduling
     decisions are made on one CPU, demonstrating ``LOCAL_ON`` dispatching,
tools/sched_ext/README.md +3 -3
index 6e282bce453c..9ab25ca7a02c 100644
@@ -168,9 +168,9 @@ well on single-socket systems with a unified L3 cache.
 
 Another simple, yet slightly more complex scheduler that provides an example of
 a basic weighted FIFO queuing policy. It also provides examples of some common
-useful BPF features, such as sleepable per-task storage allocation in the
-`ops.prep_enable()` callback, and using the `BPF_MAP_TYPE_QUEUE` map type to
-enqueue tasks. It also illustrates how core-sched support could be implemented.
+useful BPF features, such as `BPF_MAP_TYPE_ARENA` for scheduler state and
+synchronization with `bpf_res_spin_lock`. It also illustrates how core-sched
+support could be implemented.
 
 ## scx_central
 
Signature · 1 line
2.48.1
reviewer
#1 lore raw

Hello,

Thanks for catching this, but the proposed phrasing is a bit misleading. BPF_MAP_TYPE_ARENA isn't a queue-map replacement for BPF_MAP_TYPE_QUEUE
- the arena is just memory; the queueing now happens through intrusive doubly-linked lists in arena with per-queue bpf_res_spin_lock.

How about matching the file-level description in scx_qmap.bpf.c?

For Documentation/scheduler/sched-ext.rst:

* ``scx_qmap[.bpf].c``: A multi-level FIFO scheduler supporting five levels of priority implemented with arena-backed doubly-linked lists.

For tools/sched_ext/README.md:

Another simple, yet slightly more complex scheduler that provides an example of a basic weighted FIFO queuing policy. It also provides examples of some common useful BPF features, such as arena-backed doubly-linked lists threaded through per-task context and bpf_res_spin_lock for per-queue synchronization. It also illustrates how core-sched support could be implemented.

Thanks.

Signature · 1 line
tejun