Expand description
W-TinyLFU estimator + policies (filled in Stage B, Tasks 5-7).
Structs§
- Probation
Admission - Admits a first-ever miss into
Probation; once the shared estimator has seenpromotion_thresholdprior sightings of a hash, admits straight toMain. Readsestimateonly — never callsobserve(see the ordering invariant in the module docs: a request must never count as evidence for its own promotion). - Tiny
LfuEstimator - Shared W-TinyLFU frequency evidence: one sighting per served request from the serve path, one estimate read per fill-path admission decision and per probation candidate at sweep time.
- Tiny
LfuEviction - Ranks eviction candidates least-frequent-first, reading frequency from a
shared estimator; ties break oldest-access-first (LRFU), then largest
first, so blobs sharing the open-time recency seed release in the order that
reaches the target in the fewest releases. Also owns the
probation lifecycle at sweep time: promotes probation members whose
buffered frequency has reached
promotion_threshold, and caps probation’s footprint toprobation_target_pctofcache_bytesby evicting the least-frequent non-promoted probation members first.