Skip to main content

Module config

Module config 

Source
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_consts in src/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.