You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 58cd874
Browse filesBrowse the repository at this point in the historyBrowse files
docs(design): update the P2 leftover section to the shipped/decided reality (#9)
* docs(design): update the P2 leftover section to the shipped/decided reality
The "对 P2 主体实现的遗留项(本 spike 不覆盖)" section was written at
spike completion (2026-07-07) and predates the #1102/#1144/#1145/#1159
implementation waves, so it now misdescribes the state. Verified each item
against the code and rewrote the section with three explicit outcomes —
implemented, closed-by-decision, or correctly-deferred:
- eventfd reaping: implemented; AsyncFd-without-a-driver-thread closed
(Drop can't await -> API break).
- ring lifecycle: the singleton was replaced by per-disk sharding
(probe_and_start_sharded); a singleton conflicts with per-disk isolation.
- O_DIRECT read_at_direct: implemented, AND ecstore now wires it natively
(rustfs/rustfs#4649) - the section still pointed at #4645's temporary route.
- three read shapes: positioned pread_bytes wired; streaming reads are a
measured NO-GO (backlog#1144), not open work.
- per-disk probe cache + runtime errno latch: implemented (backlog#1101).
- registered buffers / write path: still correctly deferred.
Also correct the premise reference in "要证明的问题": the drop-in-flight
scenario the crate exists for is realized on production GETs, and its primary
trigger is the reader-setup quorum loop (create_bitrot_readers_until_quorum_
all_shards: FuturesUnordered io_primitives.rs:1362, break :1403,
drop(reader_tasks) :1428), where data shards are read eagerly through
UringBackend::pread_bytes -> driver.read_at().await; a task still parked at
that await drops its ReadHandle in Submitted state and issues ASYNC_CANCEL.
The old text pointed at a drifted line (:1455) and attributed the drop only to
the decode-phase FuturesUnordered.
Note in "这是什么" that P2 main has since shipped gray-off, fix the conclusion
line to match, add the post-integration page-cache-reclaim contract
(rustfs/rustfs#4662), and point the 5-item test matrix at the now-15 tests.
The ownership model, invariants, and design constraints are unchanged.
Co-Authored-By: heihutu <heihutu@gmail.com>
* docs: polish README badges and examples
---------
Co-authored-by: heihutu <heihutu@gmail.com>
@@ -109,12 +111,12 @@ These numbers come from the harnesses in this repository and from end-to-end pro
109
111
([rustfs/backlog#1159](https://github.com/rustfs/backlog/issues/1159)). They are reported as measured, including the
110
112
cases where io_uring loses.
111
113
112
-
| workload | result |
113
-
|---|---|
114
-
|**Many concurrent positioned reads on one disk** (erasure-coded shard reads) |**Where it wins.** With sharded rings and a cached fd: 64 KiB at concurrency 128 → 361k IOPS vs 125k for a blocking-pool baseline, and p999 3.0 ms vs 13.5 ms. |
115
-
|**A single sequential stream**|**It loses.** Kernel readahead already does what pipelining would buy. Cold reads are device-bound; on a warm page cache io_uring reaches only 11–41% of a buffered read. Streaming reads should stay on the std backend. |
116
-
|**One read at a time (low concurrency)**|**It loses.** Per-op submission overhead exceeds a page-cache `memcpy`. |
117
-
|**End-to-end S3 GET**|**Roughly neutral today (−7% … +4%).** The disk read is not the bottleneck: a cached 1 MiB GET spends ~25% of CPU in `memcpy` and ~10% in `memset`, and 0% on device reads. Optimising the read path further only pays once those copies are gone. |
|**Many concurrent positioned reads on one disk** (erasure-coded shard reads) |**Where it wins.** With sharded rings and a cached fd: 64 KiB at concurrency 128 → 361k IOPS vs 125k for a blocking-pool baseline, and p999 3.0 ms vs 13.5 ms. |
117
+
|**A single sequential stream**|**It loses.** Kernel readahead already does what pipelining would buy. Cold reads are device-bound; on a warm page cache io_uring reaches only 11–41% of a buffered read. Streaming reads should stay on the std backend.|
118
+
|**One read at a time (low concurrency)**|**It loses.** Per-op submission overhead exceeds a page-cache `memcpy`.|
119
+
|**End-to-end S3 GET**|**Roughly neutral today (−7% … +4%).** The disk read is not the bottleneck: a cached 1 MiB GET spends ~25% of CPU in `memcpy` and ~10% in `memset`, and 0% on device reads. Optimising the read path further only pays once those copies are gone. |
118
120
119
121
Two traps this crate's own benchmarking fell into, documented so others do not repeat them:
0 commit comments