Skip to main content

admit_bytes

Function admit_bytes 

Source
fn admit_bytes(
    normal: usize,
    stalled_parks: u32,
    persist_after: u32,
    inflight: usize,
    min_window_size: usize,
    ceiling: usize,
) -> usize
Expand description

Pure admission decision, including the persist probe. Extracted for unit testing.

  • normal = the AIMD/ceiling-bounded admissible bytes. If positive, use it (no probe).
  • Otherwise, if the persist probe is enabled (persist_after > 0) and stalled_parks has reached it, admit up to min_window_size beyond inflight, but never past the SURB ceiling — the anti-deadlock persist probe. persist_after == 0 disables the probe entirely (the default clean behaviour).