DirectStorage: count delivered bytes only upon successful completion (#2059) #2084

Open
IAmTheSween wants to merge 1 commit from upstream-pr/2094 into main
IAmTheSween commented 2026-11-25 03:51:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by IAmTheSween on 2026-11-25T03:51:26Z.


Fixes #2059.

Previously, note_request() incremented dstorage::counters().1 (BYTES) upon request arrival, prior to read or decompression. Requests that failed (such as reads past EOF, invalid file handles, corrupted decompression streams, or access violations) delivered 0 bytes to the destination buffer but still inflated the delivered bytes counter.
Move delivered byte tracking to note_delivered(), called strictly upon successful transfer in serial execute() and parallel decompression retirement (retire_one()).
What is in it

  • Move BYTES.fetch_add out of note_request in crates/xcl/src/hle/dstorage.rs.
  • Call note_delivered(n) on the destination write success path in execute().
  • Call super::note_delivered(n) on successful retirement in crates/xcl/src/hle/dstorage/parallel.rs.
  • Add unit test failed_read_does_not_increase_delivered_bytes_counter in crates/xcl/src/hle/dstorage.rs.
    Tested
  • Windows 11 Build 26300, rustc 1.100.0 MSVC, DXC 1.8.2502.11, NVIDIA GeForce RTX 5070.
  • cargo test -p xcl --lib hle::dstorage: 31 passed, 0 failed.
  • .\scripts\test.ps1 --skip fuzz_validate_and_gpu: passed (1121 passed, 0 failed, 26 ignored).
    Regression run
    scripts/smoke.ps1 on main (cbc296ab65) and on this PR's head commit (1d1ff8c2db):
xcl-smoke v1
commit: cbc296ab65a2661a61e3e2da109134bcd5319f60
gpu: NVIDIA GeForce RTX 5070
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 953 (PresentX 953)
presents per 2 s (last 3): 59 60 60
device removals: 0
crashes: 0
peak commit: 15148 MB
xcl-smoke v1
commit: 1d1ff8c2dbd72ac7af02e178acf32574b2470c53
gpu: NVIDIA GeForce RTX 5070
title: 3c290c16
seconds: 60
exit: 0x0
frames shown: 1490 (PresentX 1490)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15430 MB

Not tested

  • Game titles other than GTA 6 (title 3c290c16).
    AI use
  • Antigravity with Gemini 3.8 Flash (High): analyzed issue #2059, relocated byte counting to success paths in dstorage.rs and dstorage/parallel.rs, authored regression test failed_read_does_not_increase_delivered_bytes_counter, ran test suite and smoke regression runs.
<!-- greyfinch-sync:ivall/xcl:issue:5484838417 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2094). Originally posted by [IAmTheSween](https://github.com/IAmTheSween) on 2026-11-25T03:51:26Z. --- Fixes #2059. Previously, note_request() incremented dstorage::counters().1 (BYTES) upon request arrival, prior to read or decompression. Requests that failed (such as reads past EOF, invalid file handles, corrupted decompression streams, or access violations) delivered 0 bytes to the destination buffer but still inflated the delivered bytes counter. Move delivered byte tracking to note_delivered(), called strictly upon successful transfer in serial execute() and parallel decompression retirement (retire_one()). **What is in it** - Move BYTES.fetch_add out of note_request in crates/xcl/src/hle/dstorage.rs. - Call note_delivered(n) on the destination write success path in execute(). - Call super::note_delivered(n) on successful retirement in crates/xcl/src/hle/dstorage/parallel.rs. - Add unit test failed_read_does_not_increase_delivered_bytes_counter in crates/xcl/src/hle/dstorage.rs. **Tested** - Windows 11 Build 26300, rustc 1.100.0 MSVC, DXC 1.8.2502.11, NVIDIA GeForce RTX 5070. - cargo test -p xcl --lib hle::dstorage: 31 passed, 0 failed. - .\scripts\test.ps1 --skip fuzz_validate_and_gpu: passed (1121 passed, 0 failed, 26 ignored). **Regression run** scripts/smoke.ps1 on main (cbc296ab65a2661a61e3e2da109134bcd5319f60) and on this PR's head commit (1d1ff8c2dbd72ac7af02e178acf32574b2470c53): ``` xcl-smoke v1 commit: cbc296ab65a2661a61e3e2da109134bcd5319f60 gpu: NVIDIA GeForce RTX 5070 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 953 (PresentX 953) presents per 2 s (last 3): 59 60 60 device removals: 0 crashes: 0 peak commit: 15148 MB ``` ``` xcl-smoke v1 commit: 1d1ff8c2dbd72ac7af02e178acf32574b2470c53 gpu: NVIDIA GeForce RTX 5070 title: 3c290c16 seconds: 60 exit: 0x0 frames shown: 1490 (PresentX 1490) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15430 MB ``` **Not tested** - Game titles other than GTA 6 (title 3c290c16). **AI use** - Antigravity with Gemini 3.8 Flash (High): analyzed issue #2059, relocated byte counting to success paths in dstorage.rs and dstorage/parallel.rs, authored regression test failed_read_does_not_increase_delivered_bytes_counter, ran test suite and smoke regression runs.
futurepro62 commented 2026-11-25 06:05:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-25T05:15:27Z.


Full-suite run, since this PR has no test report yet. Tested exact head 1d1ff8c (on its base cbc296a).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 1143 passed, 0 failed, 44 ignored. SKIPPED (no wave64): a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu, a_per_lane_2d_or_3d_group_runs_on_the_gpu, coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu, cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu, gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.
  • The new tests ran and passed: failed_read_does_not_increase_delivered_bytes_counter.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 1154 passed, 0 failed, 46 ignored. SKIPPED: f16_programs_on_the_gpu (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f16_programs_on_the_gpu (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), f32_programs_on_the_gpu (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • --skip leaves out tests that fail on main 6020a33 too, not because of this PR. On NVIDIA: heap_window_out_of_memory_falls_back_to_the_switch_form (#1651), the four gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu tests, const_and_null_mask_operands_agree_with_hlsl_on_the_gpu and mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu (follow-up on #1651) fail because runner::skip_test turns their skips into failures under XCL_REQUIRE_GPU=mesh, and gpu::dxil::fuzz_tests seeds 70, 545, 1019 and 1507 fail CreateComputePipelineState with E_OUTOFMEMORY on this card (drivers 616.64 and 621.40). On AMD: fuzz_validate_and_gpu_1 fails on seed 540 (res[833] 0x7 vs CPU 0x6). The AMD run does not set XCL_REQUIRE_GPU.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
<!-- greyfinch-sync:ivall/xcl:comment:7153596095 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2094#issuecomment-7153596095). Originally posted by [futurepro62](https://github.com/futurepro62) on 2026-11-25T05:15:27Z. --- Full-suite run, since this PR has no test report yet. Tested exact head `1d1ff8c` (on its base `cbc296a`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests`: **1143 passed, 0 failed, 44 ignored**. SKIPPED (no wave64): `a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu`, `a_per_lane_2d_or_3d_group_runs_on_the_gpu`, `coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu`, `cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu`, `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`, `the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu`. - The new tests ran and passed: `failed_read_does_not_increase_delivered_bytes_counter`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1`: **1154 passed, 0 failed, 46 ignored**. SKIPPED: `f16_programs_on_the_gpu` (f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f16_programs_on_the_gpu` (f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `f32_programs_on_the_gpu` (f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))), `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows). - `--skip` leaves out tests that fail on main `6020a33` too, not because of this PR. On NVIDIA: `heap_window_out_of_memory_falls_back_to_the_switch_form` (#1651), the four `gpu::recomp::lower_dxil::tests::*_programs_on_the_gpu` tests, `const_and_null_mask_operands_agree_with_hlsl_on_the_gpu` and `mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu` ([follow-up on #1651](https://github.com/xcl-dev/xcl/issues/1651#issuecomment-7146069648)) fail because `runner::skip_test` turns their skips into failures under `XCL_REQUIRE_GPU=mesh`, and `gpu::dxil::fuzz_tests` seeds 70, 545, 1019 and 1507 fail `CreateComputePipelineState` with `E_OUTOFMEMORY` on this card (drivers 616.64 and 621.40). On AMD: `fuzz_validate_and_gpu_1` fails on seed 540 (`res[833]` 0x7 vs CPU 0x6). The AMD run does not set `XCL_REQUIRE_GPU`. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
DavidM1911 commented 2026-11-25 06:05:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T05:43:42Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7154081431 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2094#issuecomment-7154081431). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T05:43:42Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
JoaoPauluu commented 2026-11-25 06:05:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-25T05:47:33Z.


A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with main (1412 here; 1360 and 1374 on the two main runs). No DirectStorage read failed in this run as far as the log shows, so the changed counter path is not seen; this is a regression run only. The new test failed_read_does_not_increase_delivered_bytes_counter passes under Wine.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. 1d1ff8c as it is (based on cbc296a) and main 6020a33, no uncommitted changes. Retail title 1.0.2.1, scripts/linux/smoke.sh (#257) for 60 s, no input. Runs in order: main, this PR (with other PRs in between), main. The new lib tests ran under Wine, one test per process.

Regression run

main (first run):

xcl-smoke v1
commit: 6020a33b16ba2de25b3aef5947552f2dc1831f09
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1360 (PresentX 1360)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

this PR:

xcl-smoke v1
commit: 1d1ff8c2dbd72ac7af02e178acf32574b2470c53
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1412 (PresentX 1412)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 0 MB

The second main run: 1374 frames, exit: 0x0, no device removal, no crash. Under Wine, peak commit reads 0 MB, so these blocks do not check memory.

Not tested

  • the whole test suite on this head, a failed DirectStorage read, native Windows.

AI use

  • Claude Code (Claude Opus 5.5) built both commits, ran the tests and the runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
<!-- greyfinch-sync:ivall/xcl:comment:7154142617 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2094#issuecomment-7154142617). Originally posted by [JoaoPauluu](https://github.com/JoaoPauluu) on 2026-11-25T05:47:33Z. --- A regression run under Wine on Linux on the retail title: no device removal, no crash, frames level with `main` (1412 here; 1360 and 1374 on the two `main` runs). No DirectStorage read failed in this run as far as the log shows, so the changed counter path is not seen; this is a regression run only. The new test `failed_read_does_not_increase_delivered_bytes_counter` passes under Wine. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `1d1ff8c` as it is (based on `cbc296a`) and `main` `6020a33`, no uncommitted changes. Retail title 1.0.2.1, `scripts/linux/smoke.sh` (#257) for 60 s, no input. Runs in order: main, this PR (with other PRs in between), main. The new lib tests ran under Wine, one test per process. **Regression run** main (first run): ``` xcl-smoke v1 commit: 6020a33b16ba2de25b3aef5947552f2dc1831f09 gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1360 (PresentX 1360) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` this PR: ``` xcl-smoke v1 commit: 1d1ff8c2dbd72ac7af02e178acf32574b2470c53 gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 1412 (PresentX 1412) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 0 MB ``` The second `main` run: 1374 frames, `exit: 0x0`, no device removal, no crash. Under Wine, `peak commit` reads 0 MB, so these blocks do not check memory. **Not tested** - the whole test suite on this head, a failed DirectStorage read, native Windows. **AI use** - Claude Code (Claude Opus 5.5) built both commits, ran the tests and the runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
raylitebull commented 2026-11-25 11:09:22 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T10:46:11Z.


Code review on 1d1ff8c:

  • Moving only BYTES accounting into note_delivered(n) after successful writes in execute (dstorage.rs) and parallel.rs preserves REQUESTS vs FAILED parity and adds unit coverage (failed_read_does_not_increase_delivered_bytes_counter).
  • Note overlap with #2159 (8c19c0a), which also modifies BYTES/REQUESTS accounting in dstorage.rs + parallel.rs.

Remaining before merge: Fix PR description, ensure Build and test finishes green on 1d1ff8c, and dual-vendor verification.

<!-- greyfinch-sync:ivall/xcl:comment:7160147692 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2094#issuecomment-7160147692). Originally posted by [raylitebull](https://github.com/raylitebull) on 2026-11-25T10:46:11Z. --- Code review on `1d1ff8c`: - Moving only `BYTES` accounting into `note_delivered(n)` after successful writes in `execute` (`dstorage.rs`) and `parallel.rs` preserves `REQUESTS` vs `FAILED` parity and adds unit coverage (`failed_read_does_not_increase_delivered_bytes_counter`). - Note overlap with `#2159` (`8c19c0a`), which also modifies `BYTES`/`REQUESTS` accounting in `dstorage.rs` + `parallel.rs`. **Remaining before merge:** Fix `PR description`, ensure `Build and test` finishes green on `1d1ff8c`, and dual-vendor verification.
upstream-sync closed this pull request 2026-11-25 23:08:02 +00:00
CalvyPZ commented 2026-11-25 23:09:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by CalvyPZ on 2026-11-25T22:44:12Z.


This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why.

<!-- greyfinch-sync:ivall/xcl:comment:7176726424 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2094#issuecomment-7176726424). Originally posted by [CalvyPZ](https://github.com/CalvyPZ) on 2026-11-25T22:44:12Z. --- This PR has been marked as a duplicate and closed after multiple agreeing checks in #1607. If you believe this is incorrect please re-open with why.
upstream-sync reopened this pull request 2026-11-26 00:04:52 +00:00
luckyteagirl commented 2026-11-26 08:59:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T08:59:26Z.

Review: COMMENTED


At exact head 1d1ff8c (base 08db802, current main b49be18), the new byte-counter regression test can fail under the repository's parallel lib-test run even when delivery accounting is correct. This is a source-derived test review; I did not reproduce a scheduling failure.

failed_read_does_not_increase_delivered_bytes_counter samples process-global counters().1 before and after its successful execute, then again after its failed execute, and requires exact deltas of 16 and 0. Other DirectStorage queue tests in the same lib binary submit successful requests through execute/note_delivered; one can increment the global BYTES between either pair of samples. A test-only mutex would not isolate those other producers. The full suite normally runs multiple test threads, so this can report a false failure unrelated to the PR's behavior.

Could the exact-delta assertion run in an isolated subprocess, or use an injected local counter sink for the two requests? A parallel test with a forced competing successful request would make the isolation requirement visible.

AI assistance: GPT-6.2 Sol identified the shared counter; GPT-6.2 Astra verified the exact-head test and other request paths.

<!-- greyfinch-sync:ivall/xcl:review:6071094558 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2094#pullrequestreview-6071094558). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T08:59:26Z. **Review:** COMMENTED --- At exact head `1d1ff8c` (base `08db802`, current main `b49be18`), the new byte-counter regression test can fail under the repository's parallel lib-test run even when delivery accounting is correct. This is a source-derived test review; I did not reproduce a scheduling failure. `failed_read_does_not_increase_delivered_bytes_counter` samples process-global `counters().1` before and after its successful `execute`, then again after its failed `execute`, and requires exact deltas of 16 and 0. Other DirectStorage queue tests in the same lib binary submit successful requests through `execute`/`note_delivered`; one can increment the global `BYTES` between either pair of samples. A test-only mutex would not isolate those other producers. The full suite normally runs multiple test threads, so this can report a false failure unrelated to the PR's behavior. Could the exact-delta assertion run in an isolated subprocess, or use an injected local counter sink for the two requests? A parallel test with a forced competing successful request would make the isolation requirement visible. AI assistance: GPT-6.2 Sol identified the shared counter; GPT-6.2 Astra verified the exact-head test and other request paths.
Decodere commented 2026-11-27 09:04:09 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-27T09:04:09Z.


Independent desktop NVIDIA verification of PR #2094 at head 1d1ff8c2dbd72ac7af02e178acf32574b2470c53 (1 commit; exact parent & merge-base: cbc296ab65a2661a61e3e2da109134bcd5319f60, pre-#2555 ancestor of main).

Environment

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6C / 12T), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200 (Developer Mode off)
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09) MSVC, DXC 1.9.2609.5, --release

Targeted release tests & build (1d1ff8c2)

Command Result
cargo test --release -p xcl --lib failed_read_does_not_increase_delivered_bytes_counter -- --nocapture (3 consecutive runs) 1 passed; 0 failed; 0 ignored; 1124 filtered out × 3 (0.02s × 3, 0 skipped)
cargo test --release -p xcl --lib hle::dstorage:: -- --test-threads=1 (3 consecutive runs) 31 passed; 0 failed; 0 ignored; 1094 filtered out × 3 (0.14s × 3, 0 skipped)
cargo build --release -p xcl Clean build (1m 27s, exit 0, 0 new warnings)

Paired quiet 60 s retail smoke (title: 29640639)

Exact parent & merge-base (cbc296ab65a2661a61e3e2da109134bcd5319f60, cached baseline on the same machine):

xcl-smoke v1
commit: cbc296ab65a2661a61e3e2da109134bcd5319f60
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1572 (PresentX 1572)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14509 MB

PR #2094 (1d1ff8c2dbd72ac7af02e178acf32574b2470c53):

xcl-smoke v1
commit: 1d1ff8c2dbd72ac7af02e178acf32574b2470c53
gpu: NVIDIA GeForce RTX 4060
title: 29640639
seconds: 60
exit: 0x0
frames shown: 1572 (PresentX 1572)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14523 MB

Limits of coverage

  • Counting DirectStorage delivered bytes only upon successful completion (note_delivered() in serial execute() and parallel decompression retirement, excluding failed reads) was directly verified via failed_read_does_not_increase_delivered_bytes_counter (3/3) and hle::dstorage:: (31/31 × 3).
  • The 60 s retail smoke confirms zero DirectStorage streaming regression on title: 29640639 (single-run peak-commit delta vs. cached parent reflects normal startup variance, not this PR); no failed DirectStorage requests were injected during the live retail smoke.

AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).

<!-- greyfinch-sync:ivall/xcl:comment:7214242770 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2094#issuecomment-7214242770). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-27T09:04:09Z. --- Independent desktop NVIDIA verification of **PR #2094** at head `1d1ff8c2dbd72ac7af02e178acf32574b2470c53` (`1` commit; exact parent & merge-base: `cbc296ab65a2661a61e3e2da109134bcd5319f60`, pre-`#2555` ancestor of `main`). ### Environment - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6C / 12T), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` (Developer Mode off) - **Toolchain:** `rustc 1.100.0 (0ef1bc386 2026-11-09)` MSVC, DXC `1.9.2609.5`, `--release` ### Targeted release tests & build (`1d1ff8c2`) | Command | Result | | --- | --- | | `cargo test --release -p xcl --lib failed_read_does_not_increase_delivered_bytes_counter -- --nocapture` (3 consecutive runs) | `1 passed; 0 failed; 0 ignored; 1124 filtered out` × 3 (`0.02s` × 3, `0` skipped) | | `cargo test --release -p xcl --lib hle::dstorage:: -- --test-threads=1` (3 consecutive runs) | `31 passed; 0 failed; 0 ignored; 1094 filtered out` × 3 (`0.14s` × 3, `0` skipped) | | `cargo build --release -p xcl` | Clean build (`1m 27s`, exit `0`, `0` new warnings) | ### Paired quiet 60 s retail smoke (`title: 29640639`) Exact parent & merge-base (`cbc296ab65a2661a61e3e2da109134bcd5319f60`, cached baseline on the same machine): ``` xcl-smoke v1 commit: cbc296ab65a2661a61e3e2da109134bcd5319f60 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1572 (PresentX 1572) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14509 MB ``` PR #2094 (`1d1ff8c2dbd72ac7af02e178acf32574b2470c53`): ``` xcl-smoke v1 commit: 1d1ff8c2dbd72ac7af02e178acf32574b2470c53 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1572 (PresentX 1572) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14523 MB ``` ### Limits of coverage - Counting DirectStorage delivered bytes only upon successful completion (`note_delivered()` in serial `execute()` and parallel decompression retirement, excluding failed reads) was directly verified via `failed_read_does_not_increase_delivered_bytes_counter` (`3/3`) and `hle::dstorage::` (`31/31` × 3). - The 60 s retail smoke confirms zero DirectStorage streaming regression on `title: 29640639` (single-run peak-commit delta vs. cached parent reflects normal startup variance, not this PR); no failed DirectStorage requests were injected during the live retail smoke. *AI disclosure: test execution and report drafting assisted by Google Antigravity (Gemini 4 Neon).*
Foniass commented 2026-12-01 07:21:17 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:21:17Z.


Triage (#1607) – head 1d1ff8c

#2159 fixes the same thing (#2059). In execute and the parallel path it moves the BYTES increment to after a successful write, just as this PR does. It also moves REQUESTS, so failed requests are no longer counted as run, which counters() documents as 'requests run'. It has no test. This PR is first, keeps REQUESTS as documented, and has a test.
One problem: failed_read_does_not_increase_delivered_bytes_counter asserts exact deltas of the global counters().1. Other dstorage tests running in parallel can add to the counter between the two reads, so the test can fail intermittently. Asserting only that the failed request adds nothing, or serialising the test, would avoid that.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7303955733 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2094#issuecomment-7303955733). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T07:21:17Z. --- **Triage (#1607)** – head 1d1ff8c #2159 fixes the same thing (#2059). In `execute` and the parallel path it moves the `BYTES` increment to after a successful write, just as this PR does. It also moves `REQUESTS`, so failed requests are no longer counted as run, which `counters()` documents as 'requests run'. It has no test. This PR is first, keeps `REQUESTS` as documented, and has a test. One problem: `failed_read_does_not_increase_delivered_bytes_counter` asserts exact deltas of the global `counters().1`. Other dstorage tests running in parallel can add to the counter between the two reads, so the test can fail intermittently. Asserting only that the failed request adds nothing, or serialising the test, would avoid that. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/2094:upstream-pr/2094'
git switch 'upstream-pr/2094'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/2094'
git switch 'upstream-pr/2094'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2094'
git switch 'upstream-pr/2094'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2094'
git switch 'main'
git merge --squash 'upstream-pr/2094'
git switch 'main'
git merge --ff-only 'upstream-pr/2094'
git switch 'main'
git merge 'upstream-pr/2094'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!2084
No description provided.