pub enum TierEvict {
Spill {
slot: usize,
key: u64,
depth: usize,
},
Drop {
slot: usize,
depth: usize,
},
}Expand description
Outcome of crate::prefix_cache::PrefixCache::evict_snapshot_to_tier.
The spill side of the tier has a cost gate (ATLAS_SSM_SPILL_MIN_TOKENS)
mirroring the fault-in side’s ATLAS_SSM_FAULT_MIN_TOKENS, and the gate has
to be applied at VICTIM SELECTION, not at the byte move. Gating only the
byte move would leave the index entry marked tiered — findable by
lookup_tiered — with no blob behind it, so every warm turn would pay a
full-blob allocation plus a store.get only to learn it misses.
Both arms free the victim’s HBM slot, so the caller’s invariant “a reclaim always yields a slot” is preserved either way.
Variants§
Spill
Move the victim’s bytes to the tier and keep its index entry findable
(tiered = true) so a warm turn faults it back instead of recomputing.
Fields
Drop
Too shallow to be worth a spill: the index entry was REMOVED, no tier
key exists, and tier_spills was not incremented. Identical to the
pre-tier drop path.
Implementations§
Trait Implementations§
impl Copy for TierEvict
impl Eq for TierEvict
impl StructuralPartialEq for TierEvict
Auto Trait Implementations§
impl Freeze for TierEvict
impl RefUnwindSafe for TierEvict
impl Send for TierEvict
impl Sync for TierEvict
impl Unpin for TierEvict
impl UnwindSafe for TierEvict
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.