Docs/io uring async#2
Open
982945902 wants to merge 2 commits into
Open
Conversation
Design doc for migrating the SSD data path from synchronous pread/pwrite (+ per-record fsync WAL) to an io_uring-based async engine for the LLM KVCache workload. Covers: three io_uring invariants, an IoUringEngine pinned to a brpc user_pthread (ring-per-io-thread, mixed read/write), the read path (batched SubmitReads + Index::BatchGet), the two write paths (Segment data->bitmap ordered via IO_LINK, WAL group commit), relaxed cache-semantics durability, O_DIRECT/4K alignment as a later phase, and a P1-P4 rollout. Co-Authored-By: Claude <noreply@anthropic.com>
Rewrite the write-path section: instead of two independent paths, a single KVCache write organizes slot data + bitmap + WAL into one io_uring submission unit chained data -> bitmap -> WAL(commit record) -> fsync via IO_LINK. WAL lands last (it holds the index pointer, not data, so data must be durable first). Adds full crash-recovery semantics (A/B/C crash points, orphan-slot handling strategies, the index->live-slot invariant) and folds durability into the merged model. Co-Authored-By: Claude <noreply@anthropic.com>
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.
No description provided.