scx/rust/scx_utils
Andrea Righi 416d6a940f rust: introduce scx_rustland_core crate
Introduce a separate crate (scx_rustland_core) that can be used to
implement sched-ext schedulers in Rust that run in user-space.

This commit only provides the basic layout for the new crate and the
abstraction to the custom allocator.

In general, any scheduler that has a user-space component needs to use
the custom allocator to prevent potential deadlock conditions, caused by
page faults (a kthread needs to run to resolve the page fault, but the
scheduler is blocked waiting for the user-space page fault to be
resolved => deadlock).

However, we don't want to necessarily enforce this constraint to all the
existing Rust schedulers, some of them may do all user-space allocations
in safe paths, hence the separate scx_rustland_core crate.

Merging this code in scx_utils would force all the Rust schedulers to
use the custom allocator.

In a future commit the scx_rustland backend will be moved to
scx_rustland_core, making it a totally generic BPF scheduler framework
that can be used to implement user-space schedulers in Rust.

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2024-02-28 17:49:44 +01:00
..
src infeasible: Add a new infeasible crate for load balancing 2024-02-26 10:51:52 -06:00
.gitignore rustu: Import scx_rusty and scx_layered from kernel tree 2023-11-30 13:13:41 -10:00
bindings.h rust/scx_utils: Add user_exit_info support 2024-01-31 10:54:15 -10:00
bpf_h scx_utils: Add mod bpf_h 2023-11-28 15:20:01 -10:00
build.rs rust/scx_utils: Add user_exit_info support 2024-01-31 10:54:15 -10:00
Cargo.toml rust: introduce scx_rustland_core crate 2024-02-28 17:49:44 +01:00
LICENSE rust: clarify license and include text 2023-12-12 13:02:13 -08:00
meson.build build: rust projects now link against libbpf.a if provided 2023-12-02 06:41:26 -10:00
README.md scx_utils: Documentation and other minor updates 2023-12-02 23:56:36 -10:00

Utility collection for sched_ext schedulers

sched_ext is a Linux kernel feature which enables implementing kernel thread schedulers in BPF and dynamically loading them.

Thie crate is a collection of utilities for sched_ext scheduler implementations which use Rust for userspace component. This enables implementing hot paths in BPF while offloading colder and more complex operations to userspace Rust code which can be significantly more convenient and powerful.

Please see documentation for more details.