Expand description
Userspace configuration, validated scheduling constants written into BPF rodata.
Config is the single validated set of scheduling constants; the BPF side
reads them from const volatile rodata globals declared in
src/bpf/main.bpf.c (see src/bpf/intf.h for the compile-time
defaults, which are the source of truth for every value here).
The scheduler is knob-free. The production path uses Config::default()
validated by Config::validate(). ConfigBuilder exists only to drive
the validation contract from the unit tests.
Structsยง
- Config
- Validated scheduling constants.
Constantsยง
- AGING_
PERIOD_ ๐NS - Aging period.
- ALPHA ๐
- Climb aggressiveness, fixed.
- BUDGET_
MAX_ ๐NS - EMA gauge ceiling.
- DISPATCH_
MAX_ ๐BATCH - EMA_
HALF_ ๐LIFE_ NS - EMA decay half-life.
- HYSTERESIS_
SLEEP_ ๐NS - LONG_
SLEEP_ ๐NS - A sleep longer than this collapses the gauge.
- NSEC_
PER_ ๐MSEC - NSEC_
PER_ ๐SEC - NSEC_
PER_ ๐USEC - Time units matching
enum mlfq_constsinsrc/bpf/intf.h. - PREEMPT_
SLICE_ ๐NS - Slice cap for a preempting wakeup, in nsecs. The displaced task resumes at the next scheduling event once the cap expires.
- Q1_
QUOTA ๐ - Dispatch quotas.
- Q1_
SLICE_ ๐NS - Per-queue request sizes.
- Q2_
QUOTA ๐ - Q2_
SLICE_ ๐NS - Q3_
SLICE_ ๐NS - RTDL_
DRAIN_ ๐INTERVAL_ NS - Drain interval of the realtime-takeover evacuation, nsecs.
- SAMEQ_
PREEMPT_ ๐MIN_ RUN_ NS - Minimum residency before a same-queue wakeup may preempt the running task. Zero, the default, makes the interactive rule unconditional.
- SHORT_
SLEEP_ ๐NS - Short-sleep boost window. Periodic wakeup cadences such as the 60 Hz frame interval stay interactive. The per-task boost rate limit bounds the churn. The value is set against the slowest common cadence, so faster refresh rates, which sleep less per frame, fall inside the window as well.
- SHORT_
SLEEP_ ๐RATE_ LIMIT_ NS - TREE_
T_ ๐BOUND_ NS - TREE_
T_ ๐INT_ NS - Tree band edges, the rodata bases of the effective adaptation values.
- T_H_NS ๐
- T_L_NS ๐
- Classification thresholds.