Console CPU instructions: CLZERO into a title's own memory asks the working set #647

Open
github-bot wants to merge 1 commit from github-bot/gh-647 into main AGit
Owner

@⁠3L1A5-1 on GitHub · 2026-11-24 02:51 UTC · original
3L1A5-1:fix/is-writable-working-set → main · +61 −1 · 2 files · 1 commits · open

On a CPU without CLZERO (Intel before the newest generations), every emulated CLZERO line or loop asks eh::is_writable before it writes. Outside the coherent window that was a VirtualQuery, which sizes the committed run around the address by walking it to its end. The retail title's CLZERO loops zero 0.9–15 KB at a time inside a 1.1 GB block of its own committed private memory, which is neither the coherent window (#306) nor a sparse window (#501). Each check there took 0.3–4.4 ms: 4,096 of them cost 10.3 s of the first minute on the thread that ran them, and the title presented ~5 frames a second with the GPU mostly idle.

is_writable now asks the working set first, as readable already does (resident_and_readable, #332): up to 16 pages that are resident with a read-write protection and no guard are writable, answered in one call that touches none of them. Anything else (not resident, guard, no access, read-only, more than 16 pages) takes the VirtualQuery path as before. Related to #278.

What is in it

  • crates/xcl/src/gpu/shader.rs: resident_and_writable, next to resident_and_readable; both use one working-set helper (resident_with). Unit test writable_pages_are_answered_from_the_working_set (written read-write pages; resident read-only pages, also as a range's tail; never-touched and guard pages, and the guard is left intact; empty, null and wrapping ranges; more than 16 pages).
  • crates/xcl/src/eh.rs: is_writable asks it after the coherent-window check.

Tested

  • NVIDIA GeForce RTX 2060 SUPER 8 GB (Turing, 32-lane waves), driver 617.14; Intel Core i5-9400F (no CLZERO, emulated); 16 GB RAM; Windows 11 Pro 26300; rustc 1.100.0 x86_64-pc-windows-msvc; tests in debug, the title in release.
  • cargo test --workspace -- --test-threads=4 on 83deb3c: 688 passed, 0 failed, 41 ignored. SKIPPED: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask, gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64).
  • Retail title (<package id>, 1.0.2.1), XCL_NETWORK=0, scripts\smoke.ps1 -Seconds 60 on the first screen: 266 frames on main, 534 with this change (presents per 2 s at the end 10–11 → 25–27); peak commit the same. Two earlier pairs of runs on cb868b2 (same change, before the rebase): 326 / 323 frames on main, 732 / 726 with it.
  • How it was found: 30 thread samples a second apart (XCL_THREAD_DUMP_AT) put the busiest title thread (56–67 % of a core) in VirtualQuery from is_writable in about half of them; a local, uncommitted counter around that VirtualQuery gave the region size and the per-call times above.

Regression run

xcl-smoke v1
commit: bdab19492aeeb2c9ce1e05f0a15ada518d15992f
gpu: NVIDIA GeForce RTX 2060 SUPER
title: 5c554abc
seconds: 60
exit: 0x0
frames shown: 266 (PresentX 266)
presents per 2 s (last 3): 10 10 11
device removals: 0
crashes: 0
peak commit: 15376 MB
xcl-smoke v1
commit: 83deb3c24b0e4139290e650f42b0734741325c10
gpu: NVIDIA GeForce RTX 2060 SUPER
title: 5c554abc
seconds: 60
exit: 0x0
frames shown: 534 (PresentX 534)
presents per 2 s (last 3): 27 27 25
device removals: 0
crashes: 0
peak commit: 15396 MB

Not tested

  • AMD CPUs: they run CLZERO themselves, so this path is not taken there.
  • Other Intel generations, and the world-loading part of the title (only the first screen, 60 s runs).
  • Together with #523 (which reworks the VirtualQuery fallback in the same function) and #501 (sparse windows): all three are checks before that fallback, so they should combine; whichever lands second needs a small rebase.

Not covered here, and the next hotspot in the same samples: list_x::gpu_va checks vertex buffers with readable, and the buffers longer than 16 pages still take its VirtualQuery walk.

AI use

  • Claude Code with Claude Opus 5.5: profiled the runs, wrote the change, the test and this description; I ran it on my machine and checked the results.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XM3GUHydjd5DSUVNT9WNSR

**@⁠3L1A5-1** on GitHub · 2026-11-24 02:51 UTC · [original](https://github.com/xcl-dev/xcl/pull/647) `3L1A5-1:fix/is-writable-working-set` → `main` · +61 −1 · 2 files · 1 commits · open On a CPU without CLZERO (Intel before the newest generations), every emulated CLZERO line or loop asks `eh::is_writable` before it writes. Outside the coherent window that was a `VirtualQuery`, which sizes the committed run around the address by walking it to its end. The retail title's CLZERO loops zero 0.9–15 KB at a time inside a 1.1 GB block of its own committed private memory, which is neither the coherent window (#306) nor a sparse window (#501). Each check there took 0.3–4.4 ms: 4,096 of them cost 10.3 s of the first minute on the thread that ran them, and the title presented ~5 frames a second with the GPU mostly idle. `is_writable` now asks the working set first, as `readable` already does (`resident_and_readable`, #332): up to 16 pages that are resident with a read-write protection and no guard are writable, answered in one call that touches none of them. Anything else (not resident, guard, no access, read-only, more than 16 pages) takes the `VirtualQuery` path as before. Related to #278. **What is in it** - `crates/xcl/src/gpu/shader.rs`: `resident_and_writable`, next to `resident_and_readable`; both use one working-set helper (`resident_with`). Unit test `writable_pages_are_answered_from_the_working_set` (written read-write pages; resident read-only pages, also as a range's tail; never-touched and guard pages, and the guard is left intact; empty, null and wrapping ranges; more than 16 pages). - `crates/xcl/src/eh.rs`: `is_writable` asks it after the coherent-window check. **Tested** - NVIDIA GeForce RTX 2060 SUPER 8 GB (Turing, 32-lane waves), driver 617.14; Intel Core i5-9400F (no CLZERO, emulated); 16 GB RAM; Windows 11 Pro 26300; rustc 1.100.0 x86_64-pc-windows-msvc; tests in debug, the title in release. - `cargo test --workspace -- --test-threads=4` on `83deb3c`: 688 passed, 0 failed, 41 ignored. SKIPPED: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (no wave64). - Retail title (`<package id>`, 1.0.2.1), `XCL_NETWORK=0`, `scripts\smoke.ps1 -Seconds 60` on the first screen: 266 frames on `main`, 534 with this change (presents per 2 s at the end 10–11 → 25–27); peak commit the same. Two earlier pairs of runs on `cb868b2` (same change, before the rebase): 326 / 323 frames on `main`, 732 / 726 with it. - How it was found: 30 thread samples a second apart (`XCL_THREAD_DUMP_AT`) put the busiest title thread (56–67 % of a core) in `VirtualQuery` from `is_writable` in about half of them; a local, uncommitted counter around that `VirtualQuery` gave the region size and the per-call times above. **Regression run** ``` xcl-smoke v1 commit: bdab19492aeeb2c9ce1e05f0a15ada518d15992f gpu: NVIDIA GeForce RTX 2060 SUPER title: 5c554abc seconds: 60 exit: 0x0 frames shown: 266 (PresentX 266) presents per 2 s (last 3): 10 10 11 device removals: 0 crashes: 0 peak commit: 15376 MB ``` ``` xcl-smoke v1 commit: 83deb3c24b0e4139290e650f42b0734741325c10 gpu: NVIDIA GeForce RTX 2060 SUPER title: 5c554abc seconds: 60 exit: 0x0 frames shown: 534 (PresentX 534) presents per 2 s (last 3): 27 27 25 device removals: 0 crashes: 0 peak commit: 15396 MB ``` **Not tested** - AMD CPUs: they run CLZERO themselves, so this path is not taken there. - Other Intel generations, and the world-loading part of the title (only the first screen, 60 s runs). - Together with #523 (which reworks the `VirtualQuery` fallback in the same function) and #501 (sparse windows): all three are checks before that fallback, so they should combine; whichever lands second needs a small rebase. Not covered here, and the next hotspot in the same samples: `list_x::gpu_va` checks vertex buffers with `readable`, and the buffers longer than 16 pages still take its `VirtualQuery` walk. **AI use** - Claude Code with Claude Opus 5.5: profiled the runs, wrote the change, the test and this description; I ran it on my machine and checked the results. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XM3GUHydjd5DSUVNT9WNSR
On a CPU without CLZERO, `eh::is_writable` checks each emulated CLZERO line
or loop before it writes. Outside the coherent window it asked `VirtualQuery`,
which sizes the committed run around the address by walking it to its end. A
retail game's CLZERO loops zero 0.9-15 KB at a time inside its 1.1 GB block of
committed private memory (not in the coherent window, not a sparse window), and
each of those checks took 0.3-4.4 ms: 4,096 of them cost 10.3 s of the first
minute on the thread that ran them, and the title presented ~5 frames a second
with the GPU mostly idle.

`is_writable` now first asks the working set, as `readable` already does
(`resident_and_readable`, #332): up to 16 pages that are resident with a
read-write protection and no guard are writable, in one call that touches none
of them. Anything else (not resident, guard, no access, read-only, longer than
16 pages) takes the `VirtualQuery` path as before. The working-set check is
shared with `resident_and_readable` (`resident_with`).

Measured on an RTX 2060 SUPER / i5-9400F, retail title, `smoke.ps1 -Seconds 60`:
326 and 323 frames on main, 732 and 726 with this change.

Assisted-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XM3GUHydjd5DSUVNT9WNSR
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:28:19 +00:00
Author
Owner

@⁠MesshM on GitHub · 2026-11-24 03:24 UTC · original

Test run of 83deb3c24b0e4139290e650f42b0734741325c10 on AMD RDNA4. I merged it onto current main 91f9a5e locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 693 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 653 passed, 0 failed, 21 ignored
  • 0 SKIPPED; writable_pages_are_answered_from_the_working_set passes.

Review: Resident pages are answered from the working set (RW / RWX and not a guard page), and a page that is not resident still goes to VirtualQuery, so no case loses its answer; the PAGE_* modifier bits (write-combine, no-cache) sit beside the RW bits and do not hide them. I found nothing to change.

Not tested: no retail title or regression run (I have no unpacked game), no XCL_SAMPLE_* tests, release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

**@⁠MesshM** on GitHub · 2026-11-24 03:24 UTC · [original](https://github.com/xcl-dev/xcl/pull/647#issuecomment-7121066021) Test run of `83deb3c24b0e4139290e650f42b0734741325c10` on AMD RDNA4. I merged it onto current `main` `91f9a5e` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **693 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 653 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `writable_pages_are_answered_from_the_working_set` passes. **Review:** Resident pages are answered from the working set (RW / RWX and not a guard page), and a page that is not resident still goes to `VirtualQuery`, so no case loses its answer; the PAGE_* modifier bits (write-combine, no-cache) sit beside the RW bits and do not hide them. I found nothing to change. **Not tested:** no retail title or regression run (I have no unpacked game), no `XCL_SAMPLE_*` tests, release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
Author
Owner

@⁠JoaoPauluu on GitHub · 2026-11-24 04:33 UTC · original

Test report: #647 under Wine on an Intel CPU without CLZERO (Linux, NVIDIA)

Same kind of CPU as the description (Intel without CLZERO, emulated), but under Wine, where VirtualQuery and QueryWorkingSetEx are Wine's. The new test passes, and the title runs the same on both builds. Here main doesn't have the slowdown, so the speed-up doesn't show.

Setup

  • CachyOS, kernel 7.3.3-1-cachyos, Intel i5-10400F (no clzero in /proc/cpuinfo), 16 GB RAM, NVIDIA GeForce RTX 3060 12 GB, driver 620.70.06
  • Proton Experimental experimental-11.0-20261112 (wine-11.0), vkd3d-proton v3.1 (4522cc1a) + the patch from #257, DXVK from Proton, DXC 1.9.2609, DXVK_CONFIG="dxgi.hideNvidiaGpu = False"
  • Rust 1.100.0, x86_64-pc-windows-gnu (mingw-w64-gcc 16.2.0); debug for the test, release for the runs
  • Commits: this PR's head 83deb3c and its base main dd2ae9a

Unit test (lib test binary under Wine): gpu::shader::tests::writable_pages_are_answered_from_the_working_set ok, 2 of 2 runs.

GTA VI 1.0.2.1 (my own dump; 60 s runs with scripts/linux/smoke.sh from #257, XCL_NETWORK=0, alternating base / PR / PR / base). Every run logs ClzeroLoop { end_reg: 10 } in game_scarlett_master.exe+0x4e8aa70 – a console CPU instruction this CPU lacks: emulated (logged once).

build frames shown removals / crashes
dd2ae9a 998, 981 0 / 0
83deb3c 978, 982 0 / 0

On main this title already shows ~1000 frames in 60 s under Wine (the description has 266 on main and 534 with the PR on Windows), so the 0.3–4.4 ms VirtualQuery per check apparently doesn't happen with Wine's VirtualQuery. I didn't count or time the is_writable calls, so that is inferred from the frame counts, not measured.

xcl-smoke v1
commit: dd2ae9a70af5eb5aad60f02d86e386b72abe1e95
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 998 (PresentX 998)
presents per 2 s (last 3): 44 60 43
device removals: 0
crashes: 0
peak commit: 0 MB
xcl-smoke v1
commit: 83deb3c24b0e4139290e650f42b0734741325c10
gpu: NVIDIA GeForce RTX 3060
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 978 (PresentX 978)
presents per 2 s (last 3): 56 38 0
device removals: 0
crashes: 0
peak commit: 0 MB

(The first pair. peak commit: 0 MB is XCL reading 0 MB committed under Wine, see #257.)

Not tested

  • Windows (the case the PR speeds up), AMD CPUs, the rest of the suite on this branch, the world-loading part of the title

AI use: Claude Code (Claude Opus 5.5) built both commits, ran everything above on the machine above and wrote this report. The blocks and counts are pasted from those runs. The account owner asked for test reports to be posted while they were away and has not reviewed this one.

**@⁠JoaoPauluu** on GitHub · 2026-11-24 04:33 UTC · [original](https://github.com/xcl-dev/xcl/pull/647#issuecomment-7122134156) ### Test report: #647 under Wine on an Intel CPU without CLZERO (Linux, NVIDIA) Same kind of CPU as the description (Intel without CLZERO, emulated), but under Wine, where `VirtualQuery` and `QueryWorkingSetEx` are Wine's. The new test passes, and the title runs the same on both builds. Here `main` doesn't have the slowdown, so the speed-up doesn't show. **Setup** - CachyOS, kernel 7.3.3-1-cachyos, **Intel i5-10400F (no `clzero` in `/proc/cpuinfo`)**, 16 GB RAM, NVIDIA GeForce RTX 3060 12 GB, driver 620.70.06 - Proton Experimental `experimental-11.0-20261112` (wine-11.0), vkd3d-proton v3.1 (`4522cc1a`) + the patch from #257, DXVK from Proton, DXC 1.9.2609, `DXVK_CONFIG="dxgi.hideNvidiaGpu = False"` - Rust 1.100.0, `x86_64-pc-windows-gnu` (mingw-w64-gcc 16.2.0); debug for the test, release for the runs - Commits: this PR's head `83deb3c` and its base `main` `dd2ae9a` **Unit test** (lib test binary under Wine): `gpu::shader::tests::writable_pages_are_answered_from_the_working_set` ok, 2 of 2 runs. **GTA VI 1.0.2.1** (my own dump; 60 s runs with `scripts/linux/smoke.sh` from #257, `XCL_NETWORK=0`, alternating base / PR / PR / base). Every run logs `ClzeroLoop { end_reg: 10 } in game_scarlett_master.exe+0x4e8aa70 – a console CPU instruction this CPU lacks: emulated (logged once)`. | build | frames shown | removals / crashes | |---|---|---| | `dd2ae9a` | 998, 981 | 0 / 0 | | `83deb3c` | 978, 982 | 0 / 0 | On `main` this title already shows ~1000 frames in 60 s under Wine (the description has 266 on `main` and 534 with the PR on Windows), so the 0.3–4.4 ms `VirtualQuery` per check apparently doesn't happen with Wine's `VirtualQuery`. I didn't count or time the `is_writable` calls, so that is inferred from the frame counts, not measured. ``` xcl-smoke v1 commit: dd2ae9a70af5eb5aad60f02d86e386b72abe1e95 gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 998 (PresentX 998) presents per 2 s (last 3): 44 60 43 device removals: 0 crashes: 0 peak commit: 0 MB ``` ``` xcl-smoke v1 commit: 83deb3c24b0e4139290e650f42b0734741325c10 gpu: NVIDIA GeForce RTX 3060 title: GTA6.Xbox.v1.0.2.1 seconds: 60 exit: 0x0 frames shown: 978 (PresentX 978) presents per 2 s (last 3): 56 38 0 device removals: 0 crashes: 0 peak commit: 0 MB ``` (The first pair. `peak commit: 0 MB` is XCL reading 0 MB committed under Wine, see #257.) **Not tested** - Windows (the case the PR speeds up), AMD CPUs, the rest of the suite on this branch, the world-loading part of the title **AI use:** Claude Code (Claude Opus 5.5) built both commits, ran everything above on the machine above and wrote this report. The blocks and counts are pasted from those runs. The account owner asked for test reports to be posted while they were away and has not reviewed this one.
Author
Owner

@⁠iggyvilla on GitHub · 2026-11-24 05:31 UTC · original

Test report and review for 83deb3c24b0e4139290e650f42b0734741325c10 on AMD RDNA2 (merge base bdab19492, tested detached and clean, not merged onto current main).

Tested

  • AMD Radeon RX 6650 XT 8 GB (RDNA2, gfx1032, native wave64), driver 32.0.21045.29003; AMD Ryzen 7 5700X, 32 GB RAM; Windows 11 Home build 26300.9974; rustc 1.100.0 (0ef1bc386 2026-11-09) stable-x86_64-pc-windows-msvc.
  • cargo build --release -p xcl and cargo build --workspace (debug) succeeded.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on 83deb3c (debug): 685 passed, 3 failed, 41 ignored, 0 SKIPPED (both wave64 tests ran and passed; xcl lib: 645 passed, 3 failed, 21 ignored; e2e: 3 passed, 0 failed).
    • New test gpu::shader::tests::writable_pages_are_answered_from_the_working_set passes.
    • The 3 failures are pre-existing on this card at bdab194: placed_title_textures_share_vram_and_preserve_pixels (#470 / #718) and two PoisonError cascades (transitions_apply_when_their_list_is_submitted and d32s8_targets_take_their_own_size_of_video_memory, fixed by #673), both of which pass when rerun alone at --test-threads=1.
  • 60 s smoke (scripts\smoke.ps1, XCL_NETWORK=0, release build, clean tree):
xcl-smoke v1
commit: 83deb3c24b0e4139290e650f42b0734741325c10
gpu: AMD Radeon RX 6650 XT
title: GTA6.Xbox.v1.0.2.1-CYBERLEEK
seconds: 60
exit: 0x0
frames shown: 691 (PresentX 691)
presents per 2 s (last 3): 12 27 2
device removals: 0
crashes: 0
peak commit: 13583 MB

Review

  • The refactor of resident_and_readable into resident_with preserves the readable predicate (protect != 0 && protect & (PAGE_NOACCESS | PAGE_GUARD) == 0), which the smoke run exercises via readable.
  • is_writable fast-paths only resident Valid pages with PAGE_READWRITE/PAGE_EXECUTE_READWRITE and without PAGE_GUARD (<=16 pages, non-empty/non-wrapping), falling back to VirtualQuery for everything else (including PAGE_WRITECOPY), so it cannot classify a non-writable page as writable. Unit test coverage is solid. Nothing to change found.

Not tested

  • The CLZERO speedup itself. This machine's Ryzen 7 5700X executes CLZERO natively, so the title does not enter eh's emulation or is_writable during the smoke run; is_writable's working-set fast path is exercised by the unit test only, while the smoke run validates no regression and exercises resident_with via readable.
  • Base smoke on bdab194 or head merged onto current main; runs past 60 s; XCL_SAMPLE_* tests; Intel CPUs / NVIDIA GPUs.

AI use
opencode with DeepSeek V4.1 Flash (opencode-go/deepseek-v4.1-flash) ran the build, test suite, and smoke run and drafted this report.

**@⁠iggyvilla** on GitHub · 2026-11-24 05:31 UTC · [original](https://github.com/xcl-dev/xcl/pull/647#issuecomment-7123026001) Test report and review for `83deb3c24b0e4139290e650f42b0734741325c10` on AMD RDNA2 (merge base `bdab19492`, tested detached and clean, not merged onto current `main`). **Tested** - AMD Radeon RX 6650 XT 8 GB (RDNA2, gfx1032, native wave64), driver 32.0.21045.29003; AMD Ryzen 7 5700X, 32 GB RAM; Windows 11 Home build 26300.9974; `rustc 1.100.0 (0ef1bc386 2026-11-09) stable-x86_64-pc-windows-msvc`. - `cargo build --release -p xcl` and `cargo build --workspace` (debug) succeeded. - `cargo test --workspace --no-fail-fast -- --test-threads=4` on `83deb3c` (debug): **685 passed, 3 failed, 41 ignored, 0 SKIPPED** (both wave64 tests ran and passed; `xcl` lib: 645 passed, 3 failed, 21 ignored; `e2e`: 3 passed, 0 failed). - New test `gpu::shader::tests::writable_pages_are_answered_from_the_working_set` **passes**. - The 3 failures are pre-existing on this card at `bdab194`: `placed_title_textures_share_vram_and_preserve_pixels` (#470 / #718) and two `PoisonError` cascades (`transitions_apply_when_their_list_is_submitted` and `d32s8_targets_take_their_own_size_of_video_memory`, fixed by #673), both of which **pass when rerun alone** at `--test-threads=1`. - 60 s smoke (`scripts\smoke.ps1`, `XCL_NETWORK=0`, release build, clean tree): ``` xcl-smoke v1 commit: 83deb3c24b0e4139290e650f42b0734741325c10 gpu: AMD Radeon RX 6650 XT title: GTA6.Xbox.v1.0.2.1-CYBERLEEK seconds: 60 exit: 0x0 frames shown: 691 (PresentX 691) presents per 2 s (last 3): 12 27 2 device removals: 0 crashes: 0 peak commit: 13583 MB ``` **Review** - The refactor of `resident_and_readable` into `resident_with` preserves the readable predicate (`protect != 0 && protect & (PAGE_NOACCESS | PAGE_GUARD) == 0`), which the smoke run exercises via `readable`. - `is_writable` fast-paths only resident `Valid` pages with `PAGE_READWRITE`/`PAGE_EXECUTE_READWRITE` and without `PAGE_GUARD` (<=16 pages, non-empty/non-wrapping), falling back to `VirtualQuery` for everything else (including `PAGE_WRITECOPY`), so it cannot classify a non-writable page as writable. Unit test coverage is solid. Nothing to change found. **Not tested** - **The CLZERO speedup itself.** This machine's Ryzen 7 5700X executes `CLZERO` natively, so the title does not enter `eh`'s emulation or `is_writable` during the smoke run; `is_writable`'s working-set fast path is exercised by the unit test only, while the smoke run validates no regression and exercises `resident_with` via `readable`. - Base smoke on `bdab194` or head merged onto current `main`; runs past 60 s; `XCL_SAMPLE_*` tests; Intel CPUs / NVIDIA GPUs. **AI use** opencode with DeepSeek V4.1 Flash (`opencode-go/deepseek-v4.1-flash`) ran the build, test suite, and smoke run and drafted this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-25 12:34 UTC · original

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

  • cargo test -p xcl --lib: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-25 12:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/647#issuecomment-7162554885) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: 1038 passed, 1 failed in one parallel run; the failing test passes on a single-threaded rerun (1039/0). Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun. Thanks!
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/647/head:github-bot/gh-647'
git switch 'github-bot/gh-647'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-647'
git switch 'github-bot/gh-647'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-647'
git switch 'github-bot/gh-647'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-647'
git switch 'main'
git merge --squash 'github-bot/gh-647'
git switch 'main'
git merge --ff-only 'github-bot/gh-647'
git switch 'main'
git merge 'github-bot/gh-647'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.