feat(kvflash): pager serialize/deserialize + critical-chunk pinning#429
Open
dusterbloom wants to merge 3 commits into
Open
feat(kvflash): pager serialize/deserialize + critical-chunk pinning#429dusterbloom wants to merge 3 commits into
dusterbloom wants to merge 3 commits into
Conversation
ca2d293 to
5da4d85
Compare
This was referenced Jun 24, 2026
Add serialize()/deserialize() to KvFlashPager (snapshot the full resident+paged KV in logical chunk order; header-validated against layout) and a factored for_each_segment() helper. serde uses synchronous get/set and adapts to the pinned void* host_data of the async-DMA path (Luce-Org#408). Add critical-chunk pinning (pin_range/is_pinned/unpin_all + a best-effort deadlock floor) OR-ed into the ensure_free_block + reselect protections; empty by default (byte-identical non-pin path). CPU unit test (no GPU) covers serde round-trip, header-guard reject, pinning, deadlock guard, reset.
…OB, UAF, atoi-UB, re-prefill fallback, pin_range, gguf type guards)
5da4d85 to
07f1074
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Snapshot/restore for the KVFlash pager:
serialize()/deserialize()with afixed-layout header guard (rejects layout drift), plus critical-chunk pinning so
sink/anchor chunks survive eviction (with a deadlock floor that refuses pins that
would starve the eviction pool).
Shape
server/src/common/kvflash_pager.h— header-only addition; backend-agnostic.test_kvflash_pager.cpp(serde round-trip + header-mismatchguard + pin deadlock guard).
Independent of the placement PR; required by the prefill-snapshot PR.