pub fn calibration_verdict(
counter: u64,
kernel: CpuInterrupts,
outside: f64,
) -> Result<(), String>Expand description
Whether a calibration binds the counter to the kernel’s count: over its clean spins, summed, the counter must see at least this CPU’s local-timer interrupts and no more than all of its interrupts.
The /proc/interrupts reads around the spin lie outside the counter’s
interval, and reading the file takes milliseconds on a large machine, so
timer interrupts during them are in the kernel’s count only. outside is the
share of the measured interval that the counter did not cover (from the TSC),
and the allowance is that share of the kernel’s count, plus
CALIBRATION_SLACK.