scx-upstream/scheds/rust
Tejun Heo 625bb84bc4 scx_lavd: Move load subtraction to quiescent state transition
scx_lavd tracks task state transitions and updates statistics on each valid
transition. However, there's an asymmetry between the runnable/running and
stopping/quiescent transitions. In the former, the runnable and running
transitions are accounted separately in update_stat_for_enq() and
update_stat_for_run(), respectively. However, in the latter, the two
transitions are combined together in update_stat_for_stop().

This asymmetry leads to incorrect accounting. For example, a task's load
should be added to the cpu's load sum when the task gets enqueued and
subtracted when the task is no longer runnable (quiescent). The former is
accounted correctly from update_stat_for_enq() but the latter is done
whenever the task stops. A task can transit between running and stopping
multiple times before becoming quiescent, so the asymmetry can end up
subtracting the load of a task which is still running from the cpu's load
sum.

This patch:

- introduces LAVD_TASK_STAT_QUIESCENT and updates transit_task_stat() so
  that it can handle all valid state transitions including the multiple back
  and forth transitions between two pairs - QUIESCENT <-> ENQ and RUNNING
  <-> STOPPING.

- restores the symmetry by moving load adjustments part from
  update_stat_for_stop() to new update_stat_for_quiescent().

This removes a good chunk of ignored transitions. The next patch will take
care of the rest.
2024-03-26 12:23:19 -10:00
..
scx_lavd scx_lavd: Move load subtraction to quiescent state transition 2024-03-26 12:23:19 -10:00
scx_layered Merge pull request #187 from sched-ext/layered-updates 2024-03-13 17:15:18 -05:00
scx_rlfifo rusty: Account for disabled but offline CPUs 2024-03-14 11:15:28 -05:00
scx_rustland rusty: Account for disabled but offline CPUs 2024-03-14 11:15:28 -05:00
scx_rusty rusty: Fix up the scheduler description 2024-03-14 11:21:03 -05:00
meson.build scx_lavd: add scx_lavd to the meson build 2024-03-16 10:55:37 +09:00
README.md scx_lavd: add scx_lavd (Latency-criticality Aware Virtual Deadline) scheduler 2024-03-16 10:31:07 +09:00

RUST SCHEDULERS

Introduction

This directory contains schedulers with user space rust components.

The README in each scheduler directory provides some background and describes the types of workloads or scenarios they're designed to accommodate. For more details on any of these schedulers, please see the header comment in their main.rs or *.bpf.c files.

Schedulers