Module defaults

Module defaults 

Source
Expand description

Named defaults for the parametric WorkType variants, used by WorkType::from_name. Extracting the magic numbers here provides a named home for the default values so tests and docs (e.g. doc/guide/src/architecture/workers.md) can cite them by constant name instead of each tracking a scattered integer literal. Every value carries a single-line comment naming the knob and its unit; the const names mirror the {variant_snake}_{field} convention so renames show up as compile errors in both sites.

Constants§

AFFINITY_CHURN_SPIN_ITERS
ALU_HOT_WIDTH
Default for WorkType::AluHot’s width field. Widest resolves to the widest data-path the host supports at worker entry — see super::AluWidth for the resolution order.
ASYMMETRIC_WAKER_BURST_ITERS
BURSTY_BURST_DURATION
BURSTY_SLEEP_DURATION
CACHE_PIPE_BURST_ITERS
CACHE_PIPE_SIZE_KIB
CACHE_PRESSURE_SIZE_KIB
CACHE_PRESSURE_STRIDE
CACHE_YIELD_SIZE_KIB
CACHE_YIELD_STRIDE
CGROUP_ATTACH_STORM_DEST
CGROUP_CHURN_CYCLE_MS
CGROUP_CHURN_GROUPS
CROSS_AFFINITY_CHURN_SPIN_ITERS
EPOLL_STORM_CONSUMERS
EPOLL_STORM_EVENTS_PER_BURST
EPOLL_STORM_PRODUCERS
FAN_OUT_COMPUTE_CACHE_FOOTPRINT_KIB
FAN_OUT_COMPUTE_FAN_OUT
FAN_OUT_COMPUTE_OPERATIONS
FAN_OUT_COMPUTE_SLEEP_USEC
FUTEX_FAN_OUT_FAN_OUT
FUTEX_FAN_OUT_SPIN_ITERS
FUTEX_PING_PONG_SPIN_ITERS
IDLE_CHURN_BURST_DURATION
IDLE_CHURN_PRECISE_TIMING
Default for WorkType::IdleChurn’s precise_timing field. false keeps the inherited 50µs current->timer_slack_ns the variant doc describes; opt-in callers set the field to true directly to call prctl(PR_SET_TIMERSLACK, 1).
IDLE_CHURN_SLEEP_DURATION
IPC_VARIANCE_COLD_ITERS
Random cache-line touches per cold phase in WorkType::IpcVariance. 1024 touches across a 512KB working set on a typical x86 core takes ~100µs (LLC) to ~1ms (DRAM-spill).
IPC_VARIANCE_HOT_ITERS
Multiply-chain steps per hot phase in WorkType::IpcVariance. At IPC 2.0 / 2 GHz this spans ~50µs — long enough that the scheduler’s IPC-window observer sees a steady high-IPC signal before the cold phase flips it.
IPC_VARIANCE_PERIOD_ITERS
Hot+cold pair iterations per outer loop in WorkType::IpcVariance. 64 keeps per-stop-check overhead at <2% while bounding shutdown latency to one outer iteration (~10ms with the defaults above).
IRQ_WAKE_FRAME_BYTES
Default crate::workload::WorkType::IrqWake Ethernet frame size (bytes): 60 = ETH_ZLEN, the minimum L2 frame sans FCS.
IRQ_WAKE_INTERVAL_US
Default crate::workload::WorkType::IrqWake inter-frame interval (µs): 1000 (1 kHz) paces the sender so the receiver drains its queue and genuinely blocks between frames — giving a usable (non-degenerate) wake reservoir. interval_us == 0 maximizes softirq load (serviced by ksoftirqd) but degenerates the wake reservoir — see the variant doc.
MUTEX_CONTENTION_CONTENDERS
MUTEX_CONTENTION_HOLD_ITERS
MUTEX_CONTENTION_WORK_ITERS
NET_TRAFFIC_FRAME_BYTES
Default crate::workload::WorkType::NetTraffic Ethernet frame size (bytes): 60 = ETH_ZLEN, the minimum L2 frame sans FCS.
NET_TRAFFIC_INTERVAL_US
Default crate::workload::WorkType::NetTraffic inter-frame interval (µs): 0 = continuous (maximum TX-kick / softirq rate).
NUMA_MIGRATION_CHURN_PERIOD_MS
NUMA_WORKING_SET_SWEEP_REGION_KIB
NUMA_WORKING_SET_SWEEP_SWEEP_PERIOD_MS
PAGE_FAULT_CHURN_REGION_KIB
PAGE_FAULT_CHURN_SPIN_ITERS
PAGE_FAULT_CHURN_TOUCHES_PER_CYCLE
PIPE_IO_BURST_ITERS
POLICY_CHURN_SPIN_ITERS
PREEMPT_STORM_CFS_WORKERS
PREEMPT_STORM_RT_BURST_ITERS
PREEMPT_STORM_RT_SLEEP_US
PRIORITY_INVERSION_HIGH_COUNT
PRIORITY_INVERSION_HOLD_ITERS
PRIORITY_INVERSION_LOW_COUNT
PRIORITY_INVERSION_MEDIUM_COUNT
PRIORITY_INVERSION_PI_MODE
PRIORITY_INVERSION_WORK_ITERS
PRODUCER_CONSUMER_CONSUMERS
PRODUCER_CONSUMER_CONSUME_ITERS
PRODUCER_CONSUMER_PRODUCERS
PRODUCER_CONSUMER_PRODUCE_RATE_HZ
PRODUCER_CONSUMER_QUEUE_DEPTH_TARGET
RT_STARVATION_BURST_ITERS
RT_STARVATION_CFS_WORKERS
RT_STARVATION_RT_PRIORITY
RT_STARVATION_RT_WORKERS
SIGNAL_STORM_SIGNALS_PER_ITER
SIGNAL_STORM_WORK_ITERS
THUNDERING_HERD_BATCHES
THUNDERING_HERD_INTER_BATCH_MS
THUNDERING_HERD_WAITERS
TIMER_LATENCY_INTERVAL_US
Default crate::workload::WorkType::TimerLatency inter-wake interval (µs): 1000 = 1kHz, matching cyclictest’s default tick rate. The absolute deadline advances by this each cycle.
WAKE_CHAIN_DEPTH
WAKE_CHAIN_WAKE
WAKE_CHAIN_WORK_PER_HOP