pub struct TLBShootdownConfig {
pub page_count_range: (usize, usize),
pub region_pages: usize,
pub measure_variance: bool,
}Expand description
Configuration for TLB shootdown entropy collection.
§Example
let config = TLBShootdownConfig {
page_count_range: (16, 64), // fewer pages = fewer IPIs
region_pages: 128, // smaller region
measure_variance: true, // delta-of-deltas (recommended)
};Fields§
§page_count_range: (usize, usize)Range of pages to invalidate per measurement (min, max).
Varying the page count changes the number of Inter-Processor Interrupts
(IPIs) sent per mprotect() call. More pages = more IPIs = longer and
more variable latency.
Both values are clamped to [1, region_pages].
Range: min 1, max = region_pages. Default: (8, 128)
region_pages: usizeTotal memory region size in pages.
Larger regions use different physical pages each measurement, preventing
TLB prefetch patterns. The region is allocated via mmap and touched
on every page to establish TLB entries before measurement begins.
Range: 8+. Default: 256 (1 MB with 4KB pages)
measure_variance: boolUse delta-of-deltas (variance) extraction (true) or standard
absolute timing extraction (false).
Variance mode computes second-order deltas between consecutive shootdowns, removing systematic bias and amplifying the nondeterministic component. Produces higher min-entropy at the cost of ~2x raw samples.
Default: true
Trait Implementations§
Source§impl Clone for TLBShootdownConfig
impl Clone for TLBShootdownConfig
Source§fn clone(&self) -> TLBShootdownConfig
fn clone(&self) -> TLBShootdownConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more