scx-upstream/scheds/rust/scx_rusty
Tejun Heo f010eda5c0 meson: Remove scheds/rust/*/meson.build
These aren't used since 43950c65 ("build: Use workspace to group rust
sub-projects"). Drop them.
2024-09-04 06:40:17 -10:00
..
src scx_lavd, scx_mitosis, scx_rusty: Add comma for grammatical consistency 2024-08-26 13:06:58 -04:00
build.rs Restructure scheds folder names 2023-12-17 13:14:31 -08:00
Cargo.toml Merge branch 'main' into htejun/scx_rusty 2024-08-23 07:50:23 -10:00
LICENSE Restructure scheds folder names 2023-12-17 13:14:31 -08:00
README.md Clean up scx_rusty help info a bit 2024-08-24 11:56:12 -04:00
rustfmt.toml Restructure scheds folder names 2023-12-17 13:14:31 -08:00

scx_rusty

This is a single user-defined scheduler used within sched_ext, which is a Linux kernel feature which enables implementing kernel thread schedulers in BPF and dynamically loading them. Read more about sched_ext.

Overview

A multi-domain, BPF / user space hybrid scheduler. The BPF portion of the scheduler does a simple round robin in each domain, and the user space portion (written in Rust) calculates the load factor of each domain, and informs BPF of how tasks should be load balanced accordingly.

How To Install

Available as a Rust crate: cargo add scx_rusty

Typical Use Case

Rusty is designed to be flexible, accommodating different architectures and workloads. Various load balancing thresholds (e.g. greediness, frequency, etc), as well as how Rusty should partition the system into scheduling domains, can be tuned to achieve the optimal configuration for any given system or workload.

Production Ready?

Yes. If tuned correctly, rusty should be performant across various CPU architectures and workloads. By default, rusty creates a separate scheduling domain per-LLC, so its default configuration may be performant as well. Note however that scx_rusty does not yet disambiguate between LLCs in different NUMA nodes, so it may perform better on multi-CCX machines where all the LLCs share the same socket, as opposed to multi-socket machines.

Note as well that you may run into an issue with infeasible weights, where a task with a very high weight may cause the scheduler to incorrectly leave cores idle because it thinks they're necessary to accommodate the compute for a single task. This can also happen in CFS, and should soon be addressed for scx_rusty.