]> www.infradead.org Git - users/jedix/linux-maple.git/commit
sched_ext: Allow only user DSQs for scx_bpf_consume(), scx_bpf_dsq_nr_queued() and...
authorTejun Heo <tj@kernel.org>
Thu, 26 Sep 2024 22:56:46 +0000 (12:56 -1000)
committerTejun Heo <tj@kernel.org>
Thu, 26 Sep 2024 22:56:46 +0000 (12:56 -1000)
commit63fb3ec80516b256e9fc91de48567f5eda61d135
tree8bba42f2f1cff6afa80867431589714f5736ae00
parentc9c809f4137c3c0f962226c10d245d3ce2fd5b7c
sched_ext: Allow only user DSQs for scx_bpf_consume(), scx_bpf_dsq_nr_queued() and bpf_iter_scx_dsq_new()

SCX_DSQ_GLOBAL is special in that it can't be used as a priority queue and
is consumed implicitly, but all BPF DSQ related kfuncs could be used on it.
SCX_DSQ_GLOBAL will be split per-node for scalability and those operations
won't make sense anymore. Disallow SCX_DSQ_GLOBAL on scx_bpf_consume(),
scx_bpf_dsq_nr_queued() and bpf_iter_scx_dsq_new(). This means that
SCX_DSQ_GLOBAL can only be used as a dispatch target from BPF schedulers.

With scx_flatcg, which was using SCX_DSQ_GLOBAL as the fallback DSQ,
updated, this shouldn't affect any schedulers.

This leaves find_dsq_for_dispatch() the only user of find_non_local_dsq().
Open code and remove find_non_local_dsq().

Signed-off-by: tejun heo <tj@kernel.org>
Acked-by: David Vernet <void@manifault.com>
kernel/sched/ext.c