DirectStorage byte counter includes failed reads #2049
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by YYchainsAw on 2026-11-25T02:19:27Z.
dstorage::counters()describes its second value asbytes delivered, but a failed read also increases it.I checked this on Windows 11 build 26300 with Rust 1.100.0 MSVC, using XCL commit
94193f0and a synthetic 8-byte file. The probe extendserror_record_has_the_failed_requests_offset_source_size_and_tagand readscounters().1before and after each request.0x89240007)Should this counter represent requested destination bytes or bytes successfully delivered? I'd like to make a small follow-up change once the intended meaning is clear.
AI use
I ran the existing error-record test. Codex (GPT-6) prepared and ran the counter probe on my machine and helped draft this report.
I'd like to submit a PR once the intended meaning is clear.
upstream-sync referenced this issue2026-11-25 04:08:41 +00:00
Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-25T03:11:44Z.
I recommend keeping the current second counter as requested destination bytes and correcting its documentation to say that, rather than silently changing its meaning to successful delivery.
On current
maincbc296ab65a2661a61e3e2da109134bcd5319f60,execute()callsnote_request(r)before the destination and source checks.note_requestaddsr.destination_sizetoBYTESfor every attempted request. The activity line inhost.rspresents the same period's requests, MB, and failed count together. Requested bytes therefore describes the workload the title asked DirectStorage to process, including requests that fail; the failed counter supplies the accompanying error rate. Thecounters()doc comment's “bytes delivered” wording is the inconsistency.If successful throughput is also useful, I would add a separately named delivered-byte counter after successful execution, preserving the existing requested-byte diagnostic. That avoids changing historical activity numbers while making the two meanings explicit.
Tested: source review of
crates/xcl/src/hle/dstorage.rsandcrates/xcl/src/host.rsat the commit above. No new test run or runtime measurement for this comment.AI use: OpenAI Codex (GPT-6, exact variant not exposed in this session) traced the counter and activity-log paths and drafted this recommendation.
Imported from ivall/xcl. Originally posted by YYchainsAw on 2026-11-25T03:15:11Z.
Thanks, that matches what I observed. I'd like to submit a one-line doc comment fix clarifying that the counter is the requested destination size for requests that reach execution, including ones that later fail. Can a comment-only change in dstorage.rs be reviewed without a retail smoke run?