scx/rust/scx_utils
Andrea Righi a7965abdbc scx_utils: clarify error about missing CONFIG_DEBUG_INFO_BTF
If CONFIG_DEBUG_INFO_BTF is not enabled in the kernel, the C schedulers
report the following error via libbpf, clearly indicating the missing
kernel config:

 libbpf: kernel BTF is missing at '/sys/kernel/btf/vmlinux', was CONFIG_DEBUG_INFO_BTF enabled?

In contrast, the Rust schedulers report a less clear error:

 thread 'main' panicked at /home/arighi/src/scx/rust/scx_utils/src/compat.rs:23:9:
 btf__load_vmlinux_btf() returned NULL
 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Make sure to report a similar error, so that users have a better clue
about the missing kernel config. After this change the error looks like
the following:

 thread 'main' panicked at /home/arighi/src/scx/rust/scx_utils/src/compat.rs:23:9:
 btf__load_vmlinux_btf() returned NULL, was CONFIG_DEBUG_INFO_BTF enabled?

Signed-off-by: Andrea Righi <andrea.righi@canonical.com>
2024-06-27 09:15:43 +02:00
..
src scx_utils: clarify error about missing CONFIG_DEBUG_INFO_BTF 2024-06-27 09:15:43 +02:00
.gitignore scx_utils: Add log_recorder module for metrics-rs 2024-06-24 18:45:02 -06: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 utils: Export build ID values from rust scx_utils 2024-06-25 11:44:19 -05:00
Cargo.toml utils: Export build ID values from rust scx_utils 2024-06-25 11:44:19 -05:00
LICENSE rust: clarify license and include text 2023-12-12 13:02:13 -08:00
meson.build Fetch and build bpftool by default 2024-03-11 10:00:01 -07:00
README.md scx_utils: Fix typos 2024-06-18 00:35:43 +08: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.

This 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.