mirror of
https://github.com/sched-ext/scx.git
synced 2024-11-24 11:50:23 +00:00
143a55cda1
Move the LayerConfig and its children from `main.rs` into `lib.rs`. This allows other tooling, such as config managers or test executors, to modify layered configs programmatically. The end goal is to move everything in `layered` except for the argument parsing into a `run_layered` function, but I haven't done it in this diff because it's a larger change. This is a common pattern in Rust projects to do as little as possible in `main.rs` for extensibility. The only change here, other than publicity and where things are located, is the signature of `CpuPool::alloc_cpus`. It previously relied on `&Layer`, and this changes it to the two elements of `Layer` it uses. This allows `Layer` to stay confined to `main.rs` (for now) to prevent scope creep in this PR. This may be inconvenient in the short term for WIPs and anyone doing non-Cargo builds (cough me), but having things split into more files should make rebases/merges easier in the long run. Test plan: - `cargo build --release` - CI. |
||
---|---|---|
.. | ||
scx_bpfland | ||
scx_lavd | ||
scx_layered | ||
scx_mitosis | ||
scx_rlfifo | ||
scx_rustland | ||
scx_rusty | ||
.gitignore | ||
README.md |
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.