mirror of
https://github.com/sched-ext/scx.git
synced 2026-12-03 23:30:51 +00:00
Extract the per-task latency criticality tracking (wait/sleep frequency, runtime EWMA, waker/wakee propagation) from scx_lavd into a reusable library at scheds/include/lib/lat_cri.h and lib/lat_cri.bpf.c. The library provides struct lat_cri_data (embeddable in any scheduler's task_ctx), inline helpers for frequency/runtime tracking at each scheduling event, and a lat_cri_compute() function implementing the full criticality formula with waker/wakee inheritance. LAVD is refactored to embed struct lat_cri_data in its task_ctx and access all lat_cri fields through it. LAVD keeps its computation inline rather than calling lat_cri_compute() because the BPF verifier cannot handle struct copies from arena pointers across function calls. The lat_cri_compute() function and inline helpers are available for non-arena schedulers (e.g., future wd40/rusty adoption).
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.