diff options
author | Tejun Heo <[email protected]> | 2024-09-09 13:42:47 -1000 |
---|---|---|
committer | Tejun Heo <[email protected]> | 2024-09-09 13:42:47 -1000 |
commit | 4c30f5ce4f7af4f639af99e0bdeada8b268b7361 (patch) | |
tree | 68a511ae85a01033e45ec7addaecfba7a382592b /tools/testing/selftests/bpf/progs/recvmsg_unix_prog.c | |
parent | 6462dd53a26088a433f90a5c15822196f201037c (diff) |
sched_ext: Implement scx_bpf_dispatch[_vtime]_from_dsq()
Once a task is put into a DSQ, the allowed operations are fairly limited.
Tasks in the built-in local and global DSQs are executed automatically and,
ignoring dequeue, there is only one way a task in a user DSQ can be
manipulated - scx_bpf_consume() moves the first task to the dispatching
local DSQ. This inflexibility sometimes gets in the way and is an area where
multiple feature requests have been made.
Implement scx_bpf_dispatch[_vtime]_from_dsq(), which can be called during
DSQ iteration and can move the task to any DSQ - local DSQs, global DSQ and
user DSQs. The kfuncs can be called from ops.dispatch() and any BPF context
which dosen't hold a rq lock including BPF timers and SYSCALL programs.
This is an expansion of an earlier patch which only allowed moving into the
dispatching local DSQ:
http://lkml.kernel.org/r/[email protected]
v2: Remove @slice and @vtime from scx_bpf_dispatch_from_dsq[_vtime]() as
they push scx_bpf_dispatch_from_dsq_vtime() over the kfunc argument
count limit and often won't be needed anyway. Instead provide
scx_bpf_dispatch_from_dsq_set_{slice|vtime}() kfuncs which can be called
only when needed and override the specified parameter for the subsequent
dispatch.
Signed-off-by: Tejun Heo <[email protected]>
Cc: Daniel Hodges <[email protected]>
Cc: David Vernet <[email protected]>
Cc: Changwoo Min <[email protected]>
Cc: Andrea Righi <[email protected]>
Cc: Dan Schatzberg <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/recvmsg_unix_prog.c')
0 files changed, 0 insertions, 0 deletions