aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorTejun Heo <[email protected]>2024-06-18 10:09:19 -1000
committerTejun Heo <[email protected]>2024-06-18 10:09:19 -1000
commit1c29f8541e178c590c2b9b66b9681e6ccab84cea (patch)
treeac29f48582ee590a371287677656e7f3aed1a414 /include/linux
parent0922f54fdd15aedb93730eb8cfa0c069cbad4e08 (diff)
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 <[email protected]> Reviewed-by: David Vernet <[email protected]> Acked-by: Josh Don <[email protected]> Acked-by: Hao Luo <[email protected]> Acked-by: Barret Rhoden <[email protected]>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions