Repository navigation
DirectStorage: a refused request that is cancelled is not a failure - #1127
Conversation
A request that fails a check in EnqueueRequest (source type, file handle, destination page array, ...) went into the queue as Entry::Refused, which had no sequence number. CancelRequestsWithTag removed only pending Entry::Request entries, and the worker checked the cancel rules only for those, so a refused request was reported however the title cancelled it: its HRESULT in the next status entry, a FailureCount and first failure in the error record, and the error event. DirectStorage's documentation: "a cancelled request is not counted as a failure in either IDStorageStatusArray or DSTORAGE_ERROR_RECORD". Refused entries now get a sequence number from the same counter as requests (enqueue_refused / enqueue_numbered), CancelRequestsWithTag drops pending ones with a matching tag, and the worker skips submitted ones the cancel rules cover. A refused request with another tag, or enqueued after the cancel, still fails as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent Windows 11 verification at 66660bd, Rust 1.99.1 MSVC. The offline workspace build and all 15 stock DirectStorage unit tests passed. A separate fixture cancelled one submitted and one pending refused request. Both status slots completed successfully, the error event stayed unsignaled, and a neighboring valid memory copy returned the expected bytes. A later refused request with the same tag reported Synthetic coverage only. AI-assisted. Codex (GPT-6) added and ran the scratch fixture. |
|
NVIDIA run with the whole suite, since Not tested lists NVIDIA; the earlier check here ran the DirectStorage tests and a fixture. Tested
Not tested
AI use
|
Conflict in crates/xcl/src/hle/dstorage.rs: upstream's enqueue_numbered() (xcl-dev#1127, xcl-dev#1223, xcl-dev#1224) replaced the inline Request push, so the Pending::late count for destination page arrays holding 0 entries now runs on the entry that closure builds, and the returned (len, late) pair still feeds submit_if_half_full. Assisted-by: Antigravity (Claude Sonnet 5.5)
Brings in 20 newly merged upstream PRs (ivall#959, ivall#968, ivall#1079, ivall#1084, ivall#1091, ivall#1099, ivall#1127, ivall#1133, ivall#1137, ivall#1150, ivall#1211, ivall#1223, ivall#1224, ivall#1265, ivall#1289, ivall#1290, ivall#1330, ivall#1353, ivall#1354), including in-memory shader cache session fallback (ivall#1211), CPU-invisible resource Map filtering (ivall#1099), DRED partially executed list priority (ivall#1330), allocation info alignment padding (ivall#1354), and DirectStorage status/error/cancel fixes (ivall#1127, ivall#1223, ivall#1224).
A request that fails a check in
EnqueueRequest(source type, file handle, destination or source page array) goes into the queue asEntry::Refused, which had no sequence number.CancelRequestsWithTagremoved only pendingEntry::Requestentries, and the worker checked the cancel rules only for those. So a refused request was reported however the title cancelled it:FailureCountand the first failure in the error record;DirectStorage's documentation for
CancelRequestsWithTag: "A cancelled request is not counted as a failure in either IDStorageStatusArray or DSTORAGE_ERROR_RECORD."What is in it
crates/xcl/src/hle/dstorage.rs:enqueue_refused, throughenqueue_numbered, whichenqueue_requestnow uses too);CancelRequestsWithTagdrops pending ones with a matching tag;a_refused_request_that_is_cancelled_is_no_failure:E_SOURCE_TYPE, with the worker held so one is already submitted when the cancel comes;E_SOURCE_TYPE.Tested
x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug for the suite, release for the runs.cargo test --workspace -- --test-threads=4at 66660bd: 742 passed, 0 failed, 41 ignored; noSKIPPEDlines.Regression run
The
gpu:line names a virtual display adapter of this machine (what #281 / #282 / #285 fix); XCL's log namesbackend 'real' – AMD Radeon RX 9060 XT (16188 MiB VRAM).main:
PR:
Not tested
AI use
🤖 Generated with Claude Code