]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
sched_ext: Make qmap dump operation non-destructive
authorTejun Heo <tj@kernel.org>
Tue, 23 Sep 2025 19:03:26 +0000 (09:03 -1000)
committerTejun Heo <tj@kernel.org>
Tue, 23 Sep 2025 19:03:26 +0000 (09:03 -1000)
commitd452972858e5cfa4262320ab74fe8f016460b96f
tree270a529c141821ad56337a357c3f1d507908ade2
parentf3aec2adce8dbe37dabff47a16bfb260b987e0b0
sched_ext: Make qmap dump operation non-destructive

The qmap dump operation was destructively consuming queue entries while
displaying them. As dump can be triggered anytime, this can easily lead to
stalls. Add a temporary dump_store queue and modify the dump logic to pop
entries, display them, and then restore them back to the original queue.
This allows dump operations to be performed without affecting the
scheduler's queue state.

Note that if racing against new enqueues during dump, ordering can get
mixed up, but this is acceptable for debugging purposes.

Acked-by: Andrea Righi <arighi@nvidia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
tools/sched_ext/scx_qmap.bpf.c