metrale_storage/tier/
mod.rs

1// SPDX-License-Identifier: MIT OR Apache-2.0
2#![deny(warnings)]
3#![deny(clippy::all)]
4
5//! 2026-09-25: The generic tiered cache: a bounded hot arena over a cold record
6//! store, written without CUDA or verbs calls.
7//!
8//! * [`SlotArena`]: the hot tier, `num_slots` fixed-size byte slots
9//!   ([`VecSlotArena`] in host RAM, the cache peer's `MmapSlotArena`).
10//! * [`SwapStore`]: the cold tier, fixed-size records ([`DirectSwapFile`] on
11//!   disk, [`MemSwapStore`] in host RAM).
12//! * [`Residency`]: the page table over both, from a `u64` key to one blob: an
13//!   LRU of resident slots above an LRU of on-disk records, and read-pins. A
14//!   put into a full arena spills the coldest unpinned resident to the store;
15//!   with a disk cap, the coldest on-disk record is dropped and a later get of
16//!   its key misses.
17//!
18//! Owner: storage (tier).
19//! Invariants: none beyond the types.
20
21mod aligned;
22mod direct_swap;
23mod mem;
24pub mod pio;
25mod residency;
26mod traits;
27
28pub mod entropy;
29pub mod hash;
30
31pub use direct_swap::DirectSwapFile;
32pub use mem::{MemSwapStore, VecSlotArena};
33pub use residency::Residency;
34pub use traits::{SlotArena, SwapStats, SwapStore};