Expand description
Validated scheduling constants for the flow scheduler.
Copyright (c) 2026 Galih Tama galpt@v.recipes Holds the validated constants with defaults that match intf.h.
Re-exportsยง
Structsยง
- Config
- Validated scheduling constants.
Constantsยง
- ADAPT_
DAMP_ SHIFT - Half-damp shift at 1. Halves the capped step once, so one correction moves at most one quarter base.
- ADAPT_
DEADBAND_ MIN_ NS - Proportional deadband floor in nanos at 8us. Keeps the quiet band above one tick on small slices.
- ADAPT_
DEADBAND_ SHIFT - Proportional deadband shift at 5. Holds one thirty-second of the base as the quiet band with shifts only.
- ADAPT_
GROW_ NS - Adaptive grow step in nanos at 64us frozen for wire compat only. Whitelisted with no use after the proportional law.
- ADAPT_
PROP_ MAX_ NS - Proportional adapt cap in nanos at 1ms. Caps one shift step.
- ADAPT_
PROP_ SHIFT - Proportional adapt shift at 3. Maps exceed plus slack to one eighth.
- ADAPT_
SHRINK_ NS - Adaptive shrink step in nanos at 128us frozen for wire compat only. Whitelisted with no use after the proportional law.
- CAP_
BASE - Base capacity in units at 1024. Symmetric hosts share the base.
- DEF_
QUANTUM_ ๐NS - Default fixed slice in nanos.
- D_
LAT_ NS - Latency deadline bound in nanos at 4ms. Holds one twentieth period.
- HINT_
MAX - Max hint rows bound shared with the BPF header.
- LAT_
SLEEP_ MIN_ NS - Latency sleep floor in nanos at 20us. Vetoes only sleeps below this floor toward batch with no knob, so the 100us slice cap stays decoupled with no extra hold. Like fair.c, the floor paces service with no fixed priority hold. Unknown sleep fails open with no stall.
- PERIOD_
NS - Default period in nanos at 80ms. Holds four 20ms slices, so a fully used throughput task still leaves room for waits plus retries inside the period with no starvation under 20ms holds.
- PRED_
DEV_ DOWN_ SHIFT - Deviation narrow shift at 3. Moves the deviation one eighth toward a smaller error, so stable bursts keep margin.
- PRED_
DEV_ MARGIN_ SHIFT - Deviation margin shift at 1. Adds half deviation to the period, so the deadline holds average plus one and a half deviation.
- PRED_
DEV_ UP_ SHIFT - Deviation widen shift at 2. Moves the deviation one quarter toward a larger error, so ragged bursts gain margin fast.
- PRED_
DOWN_ SHIFT - Predictor fall shift at 4. Moves the average one sixteenth toward a smaller sample, so bursts decay slow.
- PRED_
MAX_ NS - Largest predictor value in nanos at 1s. Clamps long bursts.
- PRED_
MIN_ NS - Least predictor value in nanos at 1. Clamps short bursts.
- PRED_
UP_ SHIFT - Predictor rise shift at 3. Moves the average one eighth toward a larger sample, so bursts grow fast.
- PREEMPT_
MARGIN_ NS - Preempt margin in nanos at 100us. Leads the occupant key, so near ties never bounce with no knob.
- PREEMPT_
TAIL_ NS - Preempt tail in nanos at 100us. Holds the owner leftover, so nearly done owners finish with no knob.
- QUANTUM_
NS - Fixed slice in nanos at 1ms. Every insert uses this slice.
- RED_
EMAX_ NS - RED bound in nanos at 256us. Caps the maximum exceeding time with the fixed bound shared by admit plus reclaim plus credit.
- RED_
TOL_ NS - RED tolerance in nanos at 64us. Holds hard task slack only with the fixed value shared by admit plus reclaim.
- SLICE_
ENL_ NS - Extended normal latency boundary in nanos at 5ms. Caps the T5 tier, so bulk I/O plus build bursts hold room with no starve.
- SLICE_
LAT_ NS - Latency slice cap in nanos at 100us. Caps the dynamic slice plus the carryover plus the adapt step for latency work, so urgent wakeups rotate each tenth quantum with no extra hold. The cap equals the preempt tail, so a latency head at the cap never passes the tail gate and floors with no resume. Adapt steps cap at 1ms then re-clamp here, so one shift never holds past the cap. RED Emax stays at 256us past the cap, so a capped latency slice never pays as victim with no swap.
- SLICE_
LL_ NS - Low latency boundary in nanos at 100us. Caps the T2 tier, so compositor plus UI bursts rotate each tenth quantum with no hold. Matches the latency slice cap, so urgent wakeups keep one bound.
- SLICE_
MAX_ NS - Dynamic slice ceiling in nanos at 20ms. Caps the T6 tier plus the multi-tier spectrum, so throughput bursts hold room with an 80ms period guarding starvation.
- SLICE_
MIN_ NS - Dynamic slice floor in nanos at 10us. Fresh waits clamp the saturated remaining time to this floor with the quantum ceiling.
- SLICE_
MLL_ NS - Medium-low latency boundary in nanos at 500us. Caps the T3 tier, so IPC plus microservice bursts hold margin with no storm.
- SLICE_
NL_ NS - Normal latency boundary in nanos at 1ms. Caps the T4 tier at one quantum, so desktop plus worker bursts rotate each quantum.
- SLICE_
ULL_ NS - Ultra-low latency boundary in nanos at 50us. Caps the T1 tier, so audio plus frame pacing bursts pace tightly with no extra hold.
- WEIGHT_
BASE - Base weight with a neutral share.
- WEIGHT_
MAX - Largest weight admitted.
- WEIGHT_
MIN - Least weight admitted.