mirror of
https://github.com/sched-ext/scx.git
synced 2026-12-03 15:20:51 +00:00
Cargo reports unused dependencies a few at a time, depending on which packages a build includes, so removing the ones it named left others to surface on the next build: regex in scx_pandemonium is the latest. Rather than wait for each, go through every scheduler's [dependencies] and drop the entries its Rust sources never mention, then let the compiler have the last word, since code generated at build time can use a crate the sources do not name. - scx_pandemonium: regex. - scx_lavd, scx_mavd: bitvec, hex, static_assertions, nix. - scx_mitosis: bitvec, lazy_static, crossbeam. - scx_nitosis: bitvec, lazy_static, libc, crossbeam. - scx_p2dq: chrono, libc, static_assertions. - scx_layered: bitvec. - scx_cosmos: nvml-wrapper-sys. `cargo check --all-targets` passes for scx_pandemonium, scx_lavd, scx_mitosis, scx_p2dq, scx_layered and scx_cosmos without them. scx_mavd and scx_nitosis carry the same entries as scx_lavd and scx_mitosis and are changed the same way, except that scx_mitosis keeps libc: its config.rs checks for libc::ENODEV when a cgroup is removed while its cpuset is read. scx_rustland and scx_rlfifo are left alone: plain, ctrlc, libc and procfs do not appear in their own sources either, but the code scx_rustland_core generates into them may well use them. Signed-off-by: Piotr Gorski <lucjan.lucjanov@gmail.com>
scx_mitosis
A cgroup-aware scheduler that isolates workloads into cells. The eventual goal is to enable overcomitting workloads on datacenter servers.
How it works
The direct children of the cgroup passed via --cell-parent-cgroup each get
their own cell, except for names excluded with --cell-exclude, which remain
in cell 0. Each cell owns a dedicated CPU set with a shared dispatch queue.
Tasks within a cell are scheduled using weighted vtime. CPU-pinned tasks
(typically system threads) use per-CPU queues. Cell and CPU tasks compete for
dispatch based on their vtime.
On multi-LLC systems, LLC-awareness keeps tasks on cache-sharing CPUs. In this case, the single cell queue is split into multiple queues, one per LLC.
Usage
# Basic
scx_mitosis --cell-parent-cgroup /workloads
# With LLC-awareness
scx_mitosis --cell-parent-cgroup /workloads --enable-llc-awareness
# Run the scheduler and monitor its stats in the same process
scx_mitosis --cell-parent-cgroup /workloads --monitor-sync 1
# Monitor an already running scheduler from another terminal
scx_mitosis --monitor 1