spark_storage/
snapshot_swap.rs

1// SPDX-License-Identifier: AGPL-3.0-only
2//
3// Peer-side paging core for the SSM-snapshot spill tier.
4//
5// Turns the paging peer's fixed RDMA arena into a bounded page-cache over an
6// UNBOUNDED lower tier (an NVMe swap file) — infinite depth. The peer owns the
7// residency map (so all fleet clients SHARE one warm cache instead of each
8// owning a colliding client-side allocator), and the stable per-rail arena MR
9// is NEVER re-registered — bytes swap under the fixed rkey, driven by a TCP
10// control channel.
11//
12// The GENERIC half of this module — the `SlotArena`/`SwapStore` seams, the
13// `Residency` page table and the O_DIRECT
14// `DirectSwapFile` — lives in the CUDA-/verbs-free `atlas-tier` crate and is
15// re-exported below, so consumers keep their `crate::snapshot_swap::*` paths
16// unchanged. What REMAINS here is the peer-specific half: the TCP control
17// protocol (byte-frozen, golden-pinned — what the fleet peer binary speaks),
18// the paging loops, the client codec, and the `MmapSlotArena` over the peer's
19// RDMA-registered mmap MR — split into the `wire` and `mmap_arena` sub-modules.
20
21#![allow(dead_code)]
22
23/// The generic paging core, lifted to `atlas-tier` (CUDA- and verbs-free).
24/// Re-exported under the `atlas_tier` names (no historical aliases).
25pub use atlas_tier::{
26    DirectSwapFile, MemSwapStore, Residency, SlotArena, SwapStats, SwapStore, VecSlotArena,
27};
28
29mod mmap_arena;
30mod wire;
31
32pub use mmap_arena::MmapSlotArena;
33pub use wire::*;