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

Open
3L1A5-1 wants to merge 1 commit from upstream-pr/647 into main
3L1A5-1 commented 2026-11-24 02:51:14 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by 3L1A5-1 on 2026-11-24T02:51:14Z.


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

<!-- greyfinch-sync:ivall/xcl:issue:5465163330 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/647). Originally posted by [3L1A5-1](https://github.com/3L1A5-1) on 2026-11-24T02:51:14Z. --- 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
MesshM commented 2026-11-24 07:05:52 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T03:24:53Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7121066021 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/647#issuecomment-7121066021). Originally posted by [MesshM](https://github.com/MesshM) on 2026-11-24T03:24:53Z. --- 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.
JoaoPauluu commented 2026-11-24 07:06:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JoaoPauluu on 2026-11-24T04:33:53Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7122134156 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/647#issuecomment-7122134156). Originally posted by [JoaoPauluu](https://github.com/JoaoPauluu) on 2026-11-24T04:33:53Z. --- ### 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.
iggyvilla commented 2026-11-24 07:06:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by iggyvilla on 2026-11-24T05:31:21Z.


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.

<!-- greyfinch-sync:ivall/xcl:comment:7123026001 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/647#issuecomment-7123026001). Originally posted by [iggyvilla](https://github.com/iggyvilla) on 2026-11-24T05:31:21Z. --- 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.
DavidM1911 commented 2026-11-25 13:05:10 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T12:34:13Z.


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!

<!-- greyfinch-sync:ivall/xcl:comment:7162554885 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/647#issuecomment-7162554885). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T12:34:13Z. --- 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!
Foniass commented 2026-12-01 03:52:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:52:54Z.


Triage (#1607) – head 83deb3c

Not on main. eh::is_writable on main gained sparse::known_writable (a0780942), but that only covers sparse windows. It does not cover a title's own committed memory, which is what this PR answers from the working set. #523 also changes is_writable, for correctness (guard pages, multi-region spans, lazy pages), not for the cost of VirtualQuery. It is a different change, though the two will conflict. #1829 only adds tests for CLZERO and other instructions in eh.
The PR conflicts with main now (the is_writable context moved), so it needs a rebase. No problems found in resident_with / resident_and_writable: a page outside the working set or with a guard falls back to VirtualQuery, and the test covers this.
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:7300157534 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/647#issuecomment-7300157534). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:52:54Z. --- **Triage (#1607)** – head 83deb3c Not on main. `eh::is_writable` on main gained `sparse::known_writable` (a0780942), but that only covers sparse windows. It does not cover a title's own committed memory, which is what this PR answers from the working set. #523 also changes `is_writable`, for correctness (guard pages, multi-region spans, lazy pages), not for the cost of `VirtualQuery`. It is a different change, though the two will conflict. #1829 only adds tests for CLZERO and other instructions in `eh`. The PR conflicts with main now (the `is_writable` context moved), so it needs a rebase. No problems found in `resident_with` / `resident_and_writable`: a page outside the working set or with a guard falls back to `VirtualQuery`, and the test covers this. 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/647:upstream-pr/647'
git switch 'upstream-pr/647'

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/647'
git switch 'upstream-pr/647'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/647'
git switch 'upstream-pr/647'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/647'
git switch 'main'
git merge --squash 'upstream-pr/647'
git switch 'main'
git merge --ff-only 'upstream-pr/647'
git switch 'main'
git merge 'upstream-pr/647'
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!642
No description provided.