pub fn select_victim_slot(
cache: &[(usize, SlotView)],
) -> Result<usize, VictimError>Expand description
2026-09-25: Pick the slot a promotion overwrites, from cache, the
(slot_index, view) pairs the caller passes (model-engine passes
cache_slot_views(), slots [pinned, max_loras)):
- the first unfilled slot;
- else the
ref_count == 0slot with the smallestlast_used; - else
Err(PoolFull).