scx-upstream/scheds/rust
Andrea Righi d0fb29a0f7 scx_rustland: aggressively prioritize interactive tasks
scx_rustland was originally designed as a PoC to showcase the benefits
of implementing specialized schedulers via sched_ext, focusing on a very
specific use case: prioritize game responsiveness regardless of what
runs in the background.

Its original design was subsequently modified to better serve as a
general-purpose scheduler, balancing the prioritization of interactive
tasks with CPU-intensive ones to prevent over-prioritization.

With scx_bpfland serving as a more "general-purpose" scheduler, it makes
sense to revisit scx_rustland's original goal and make it  much more
aggressive at prioritizing interactive tasks, determined in function of
their average amount of context switches.

This change makes scx_rustland again a really good PoC to showcase the
benefits of having specialized schedulers, by focusing only at a very
specific use case: provide a high and stable frames-per-second (fps)
while a kernel build is running in the background.

= Results =

 - Test: Run a WebGL application [1] while building the kernel (make -j32)
 - Hardware: 8-cores Intel 11th Gen Intel(R) Core(TM) i7-1195G7 @ 2.90GHz

  +----------------------+--------+--------+
  |      Scheduler       | avg fps|  stdev |
  +----------------------+--------+--------+
  |               EEVDF  |   28   |  4.00  |
  | scx_rustland-before  |   43   |  1.25  |
  |  scx_rustland-after  |   60   |  0.25  |
  +----------------------+--------+--------+

[1] https://webglsamples.org/aquarium/aquarium.html

Signed-off-by: Andrea Righi <andrea.righi@linux.dev>
2024-09-02 15:53:35 +02:00
..
scx_bpfland scx_bpfland: directly dispatch only per-cpu kthreads with local_kthreads 2024-08-31 16:35:54 +02:00
scx_lavd scx_lavd: make the old verifier happy (bpf_cpumask_set_cpu) 2024-09-02 18:00:12 +09:00
scx_layered scx_layered: Fix layer timeslice not being applied 2024-08-30 11:53:42 -07:00
scx_mitosis scx_lavd, scx_mitosis, scx_rusty: Add comma for grammatical consistency 2024-08-26 13:06:58 -04:00
scx_rlfifo scx_rustland_core: bump up major version to 2.0.0 2024-08-31 23:23:26 +02:00
scx_rustland scx_rustland: aggressively prioritize interactive tasks 2024-09-02 15:53:35 +02:00
scx_rusty scx_lavd, scx_mitosis, scx_rusty: Add comma for grammatical consistency 2024-08-26 13:06:58 -04:00
.gitignore build: Use workspace to group rust sub-projects 2024-08-25 00:47:58 -10:00
Cargo.lock scx_rustland_core: bump up major version to 2.0.0 2024-08-31 23:23:26 +02:00
Cargo.toml build: Use workspace to group rust sub-projects 2024-08-25 00:47:58 -10:00
meson.build build: Use workspace to group rust sub-projects 2024-08-25 00:47:58 -10:00
README.md scheds: introduce scx_bpfland 2024-06-27 17:28:42 +02: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