summaryrefslogtreecommitdiffstats
path: root/tools/sched_ext
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2024-06-18 22:09:19 +0200
committerTejun Heo <tj@kernel.org>2024-06-18 22:09:19 +0200
commit1c29f8541e178c590c2b9b66b9681e6ccab84cea (patch)
treeac29f48582ee590a371287677656e7f3aed1a414 /tools/sched_ext
parentsched_ext: Make watchdog handle ops.dispatch() looping stall (diff)
downloadlinux-1c29f8541e178c590c2b9b66b9681e6ccab84cea.tar.xz
linux-1c29f8541e178c590c2b9b66b9681e6ccab84cea.zip
sched_ext: Add task state tracking operations
Being able to track the task runnable and running state transitions are useful for a variety of purposes including latency tracking and load factor calculation. Currently, BPF schedulers don't have a good way of tracking these transitions. Becoming runnable can be determined from ops.enqueue() but becoming quiescent can only be inferred from the lack of subsequent enqueue. Also, as the local dsq can have multiple tasks and some events are handled in the sched_ext core, it's difficult to determine when a given task starts and stops executing. This patch adds sched_ext_ops.runnable(), .running(), .stopping() and .quiescent() operations to track the task runnable and running state transitions. They're mostly self explanatory; however, we want to ensure that running <-> stopping transitions are always contained within runnable <-> quiescent transitions which is a bit different from how the scheduler core behaves. This adds a bit of complication. See the comment in dequeue_task_scx(). Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: David Vernet <dvernet@meta.com> Acked-by: Josh Don <joshdon@google.com> Acked-by: Hao Luo <haoluo@google.com> Acked-by: Barret Rhoden <brho@google.com>
Diffstat (limited to 'tools/sched_ext')
0 files changed, 0 insertions, 0 deletions