pub(crate) fn probe_handoff_hop_ns() -> Option<HandoffProbe>Expand description
Measure one wake + block + switch hop on THIS host.
Two threads ping-pong through a condvar, which exercises exactly the path
cake_handoff_max_ns is a proxy for: a blocking handoff between two
tasks. It used to be a slice divisor (/2048), since removed: that made it
made it wrong at any other slice value and wrong on any other CPU – at a
1 ms slice it evaluated to 488 ns, below this host’s ~606 ns sleep floor, so
nothing could qualify and the co-location gate silently disabled itself.
Runs before the scheduler attaches, so it measures the stock kernel path. ~2200 round trips, a few milliseconds of startup. Returns nanoseconds per one-way hop, or None if the probe could not complete – callers keep the compiled-in defaults rather than trusting a failed measurement.