• Tejun Heo's avatar
    sched_ext: Allow only user DSQs for scx_bpf_consume(), scx_bpf_dsq_nr_queued()... · 63fb3ec8
    Tejun Heo authored
    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: default avatartejun heo <tj@kernel.org>
    Acked-by: default avatarDavid Vernet <void@manifault.com>
    63fb3ec8
ext.c 203 KB