sched_ext/scx_qmap: Pick idle CPU for direct dispatch on !wakeup enqueues
authorTejun Heo <tj@kernel.org>
Fri, 12 Jul 2024 18:20:33 +0000 (08:20 -1000)
committerTejun Heo <tj@kernel.org>
Fri, 12 Jul 2024 18:20:33 +0000 (08:20 -1000)
commit1edab907b57d42e2dcf4c16a00185a89209e8700
tree96b424ec5a976d00bc4634416b597cb4a0c7d465
parent5b26f7b920f76b2b9cc398c252a9e35e44bf5bb9
sched_ext/scx_qmap: Pick idle CPU for direct dispatch on !wakeup enqueues

Because there was no way to directly dispatch to the local DSQ of a remote
CPU from ops.enqueue(), scx_qmap skipped looking for an idle CPU on !wakeup
enqueues. This restriction was removed and sched_ext now allows
SCX_DSQ_LOCAL_ON verdicts for direct dispatches.

Factor out pick_direct_dispatch_cpu() from ops.select_cpu() and use it to
direct dispatch from ops.enqueue() on !wakeup enqueues.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: David Vernet <void@manifault.com>
Cc: Dan Schatzberg <schatzberg.dan@gmail.com>
Cc: Changwoo Min <changwoo@igalia.com>
Cc: Andrea Righi <righi.andrea@gmail.com>
tools/sched_ext/scx_qmap.bpf.c
tools/sched_ext/scx_qmap.c