D3D12.X: XCL_LOOK_AHEAD takes written pages between submits by default #3436

Closed
KOLESNiii wants to merge 1 commit from upstream-pr/3436 into main
KOLESNiii commented 2026-11-29 16:26:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-29T16:26:51Z.


XCL_LOOK_AHEAD (a thread that takes the hot blocks' written pages between submits, a004fe7b) is now on by default at 2 ms. XCL_LOOK_AHEAD=0 turns it off, and XCL_WATCH_HOT=0 still turns it off too. Fixes #3435.

Why: on a retail game (main d8bd9a38, RTX 2070 SUPER) the looks for written pages before each submit took a mean of 8.8 % of wall time in menus and 14–16 % in 300–600 s runs, peaking at 65 % in one 2 s window. A look's cost grows with the pages it takes: each is a page-table entry changed and flushed on every core (~0.5 µs), and the game's world had ~8,000 pages a look, ~5 ms on the submitting thread. Look-ahead takes them on its own thread. The next submit drains what it found (AHEAD) into its dirty pages with its own look, so what is uploaded, and when, stays as it was.

XCL_LOOK_SKIP stays opt-in. Unlike look-ahead, it changes what a submit sees: a CPU write between a list's close and its submit waits for the next look.

Measurement: no gain. The A/B run (A default, C XCL_LOOK_AHEAD=2, B with XCL_LOOK_SKIP=1 added; 300 s each, same exe, retail game) is in the comment below: C raised the look work on the submitting thread from 115 to 137 ms per 2 s, and frames stayed within noise. As this description said it would, the PR stops here.

What is in it

  • crates/xcl/src/hle/d3d12x/title_textures.rs:
    • look_ahead() defaults to 2 ms; look_ahead_ms is the pure parser (unset or not a number → 2, 0 → off);
    • the drain of AHEAD into a submit's dirty pages becomes take_ahead, with no behaviour change;
    • tests: look_ahead_is_on_at_two_ms_unless_turned_off, plus pages_found_ahead_are_kept_for_the_next_submit now checks that every page found ahead reaches the next submit's dirty pages, once.
  • README.md: one line for XCL_LOOK_AHEAD.

Tested

  • NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40), AMD Ryzen 5 3600XT, Windows 11 Home build 26300, rustc 1.100.1, debug.
  • cargo test -p xcl --lib title_textures::tests::: 66 passed, 0 failed, 1 ignored.
  • Whole suite through the queue: pending, counts will be added here.

Regression run

  • pending: scripts/smoke.ps1 on main bc2cbb72 and on this head.

Not tested

  • The gain itself (A/B run pending, see above).
  • Startup shader preparation: the smoke runs use XCL_PREPARE=0 on both sides.
  • AMD (RDNA2/3/4) and Intel GPUs.
  • Titles that submit from several threads: the global REFRESH lock still serialises the submits, and look-ahead does not change that.
  • Whether 2 ms is the best period: it is the value being measured.

AI use

  • Claude Code, Claude Opus 5.5: the code, the tests and this description. The investigation and measurement plan were Claude Code, Claude Opus 5.5 as well.

🤖 Generated with Claude Code

<!-- greyfinch-sync:ivall/xcl:issue:5552698055 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3436). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-29T16:26:51Z. --- `XCL_LOOK_AHEAD` (a thread that takes the hot blocks' written pages between submits, a004fe7b) is now on by default at 2 ms. `XCL_LOOK_AHEAD=0` turns it off, and `XCL_WATCH_HOT=0` still turns it off too. Fixes #3435. Why: on a retail game (main d8bd9a38, RTX 2070 SUPER) the looks for written pages before each submit took a mean of 8.8 % of wall time in menus and 14–16 % in 300–600 s runs, peaking at 65 % in one 2 s window. A look's cost grows with the pages it takes: each is a page-table entry changed and flushed on every core (~0.5 µs), and the game's world had ~8,000 pages a look, ~5 ms on the submitting thread. Look-ahead takes them on its own thread. The next submit drains what it found (`AHEAD`) into its dirty pages with its own look, so what is uploaded, and when, stays as it was. `XCL_LOOK_SKIP` stays opt-in. Unlike look-ahead, it changes what a submit sees: a CPU write between a list's close and its submit waits for the next look. **Measurement: no gain.** The A/B run (A default, C `XCL_LOOK_AHEAD=2`, B with `XCL_LOOK_SKIP=1` added; 300 s each, same exe, retail game) is in the comment below: C raised the look work on the submitting thread from 115 to 137 ms per 2 s, and frames stayed within noise. As this description said it would, the PR stops here. **What is in it** - `crates/xcl/src/hle/d3d12x/title_textures.rs`: - `look_ahead()` defaults to 2 ms; `look_ahead_ms` is the pure parser (unset or not a number → 2, `0` → off); - the drain of `AHEAD` into a submit's dirty pages becomes `take_ahead`, with no behaviour change; - tests: `look_ahead_is_on_at_two_ms_unless_turned_off`, plus `pages_found_ahead_are_kept_for_the_next_submit` now checks that every page found ahead reaches the next submit's dirty pages, once. - `README.md`: one line for `XCL_LOOK_AHEAD`. **Tested** - NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40), AMD Ryzen 5 3600XT, Windows 11 Home build 26300, rustc 1.100.1, debug. - `cargo test -p xcl --lib title_textures::tests::`: 66 passed, 0 failed, 1 ignored. - Whole suite through the queue: pending, counts will be added here. **Regression run** - pending: `scripts/smoke.ps1` on main bc2cbb72 and on this head. **Not tested** - The gain itself (A/B run pending, see above). - Startup shader preparation: the smoke runs use `XCL_PREPARE=0` on both sides. - AMD (RDNA2/3/4) and Intel GPUs. - Titles that submit from several threads: the global `REFRESH` lock still serialises the submits, and look-ahead does not change that. - Whether 2 ms is the best period: it is the value being measured. **AI use** - Claude Code, Claude Opus 5.5: the code, the tests and this description. The investigation and measurement plan were Claude Code, Claude Opus 5.5 as well. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
andrewDoing commented 2026-11-29 17:00:01 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-29T17:00:01Z.


I ran a synthetic Windows write-watch comparison on 0ef9307a, Ryzen 7 5700X3D, Windows 11 26300.10075, Rust 1.100.0, debug. The fixture used one 32 MiB MEM_WRITE_WATCH allocation and the production look-ahead thread, take_ahead, take_hot, and the foreground sort/dedup. Each trial wrote 8,192 distinct pages and rewrote 128 before collecting the dirty set. I ran XCL_LOOK_AHEAD=0 and the unset 2 ms default in fresh processes in ABBA order, with 96 measured trials per process for each gap. Every trial found all 8,192 expected dirty addresses. Both PR tests passed, and all eight probe processes passed with zero skips.

Times are in microseconds. Ranges span the two fresh processes for each row. Foreground time starts before acquiring ONE_LOOK and ends after sorting and deduplicating the dirty pages.

Pause before the 128 rewrites Look-ahead Foreground median Foreground p95 Scan median Sort/dedup median
None Off 257 452–454 230 26
None Default 290–291 380–453 86–87 193–195
~3.25 ms Off 316–317 364–397 281–283 33
~3.25 ms Default 297–299 308–312 49–50 243–244

With the pause, the default left 128 pages for the foreground scan (median and p95), down from 8,192. Sorting and deduplication absorbed much of the scan-time gain. Median time from the first write through the end of the foreground stage, with the deliberate pause subtracted, was 5.18–5.43 ms off and 5.38–5.56 ms with the default across the two workloads. In the retail comparison, tracking the full look through the sort and the ONE_LOOK wait would help show how much of the scan saving reaches the submitting thread. Retail measurement plan

This measured the CPU write-watch stage only. GPU work, retail frames and release performance remain unmeasured here. Codex with GPT-6.2 Sol wrote and ran the test-only fixture and prepared the report.

<!-- greyfinch-sync:ivall/xcl:comment:7259340348 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3436#issuecomment-7259340348). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-29T17:00:01Z. --- I ran a synthetic Windows write-watch comparison on `0ef9307a`, Ryzen 7 5700X3D, Windows 11 26300.10075, Rust 1.100.0, debug. The fixture used one 32 MiB `MEM_WRITE_WATCH` allocation and the production look-ahead thread, `take_ahead`, `take_hot`, and the foreground sort/dedup. Each trial wrote 8,192 distinct pages and rewrote 128 before collecting the dirty set. I ran `XCL_LOOK_AHEAD=0` and the unset 2 ms default in fresh processes in ABBA order, with 96 measured trials per process for each gap. Every trial found all 8,192 expected dirty addresses. Both PR tests passed, and all eight probe processes passed with zero skips. Times are in microseconds. Ranges span the two fresh processes for each row. Foreground time starts before acquiring `ONE_LOOK` and ends after sorting and deduplicating the dirty pages. | Pause before the 128 rewrites | Look-ahead | Foreground median | Foreground p95 | Scan median | Sort/dedup median | | --- | --- | ---: | ---: | ---: | ---: | | None | Off | 257 | 452–454 | 230 | 26 | | None | Default | 290–291 | 380–453 | 86–87 | 193–195 | | ~3.25 ms | Off | 316–317 | 364–397 | 281–283 | 33 | | ~3.25 ms | Default | 297–299 | 308–312 | 49–50 | 243–244 | With the pause, the default left 128 pages for the foreground scan (median and p95), down from 8,192. Sorting and deduplication absorbed much of the scan-time gain. Median time from the first write through the end of the foreground stage, with the deliberate pause subtracted, was 5.18–5.43 ms off and 5.38–5.56 ms with the default across the two workloads. In the retail comparison, tracking the full look through the sort and the `ONE_LOOK` wait would help show how much of the scan saving reaches the submitting thread. [Retail measurement plan](https://github.com/xcl-dev/xcl/issues/3435) This measured the CPU write-watch stage only. GPU work, retail frames and release performance remain unmeasured here. Codex with GPT-6.2 Sol wrote and ran the test-only fixture and prepared the report.
KOLESNiii commented 2026-11-29 17:14:57 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-29T17:14:57Z.


Results request: does look-ahead at 2 ms help a real title?

Thanks @andrewDoing for the synthetic run. It shows that no page is lost. Its gain can't carry over to a game: it was a debug build (sorting is slow there, the scan is kernel time and is not), and a one-thread process in one 32 MiB allocation pays about 0.03 µs a page for the scan, where a retail game pays about 0.5 µs (the reset flushes every core the title's threads run on). The data this PR needs comes from a retail title in a release build, with look-ahead off and on.

Background: on main d8bd9a38 the looks for written pages before each submit took a mean of 8.8 % of wall time in menus and 14–16 % in 300–600 s runs (RTX 2070 SUPER, retail game). A run of our own is queued and will be posted here too.

What is compared: one build of this PR's head, 0ef9307a. XCL_LOOK_AHEAD=0 (off, as on main) against XCL_LOOK_AHEAD unset (the new default, 2 ms). Use the same exe for both sides so that the shader caches are shared.

Build

git fetch https://github.com/KOLESNiii/xcl d3d12x-look-ahead-default
git checkout 0ef9307a
cargo build --release -p xcl

Release only, not debug. Note your rustc --version.

Warm-up (not measured): one run with startup preparation on, so that the shaders your title uses are compiled and cached:

.\scripts\smoke.ps1 -Game '<your title folder>' -Seconds 300 -StartupTimeoutSeconds 7200 -OutDir .\la\warmup

Measured runs: the same title and the same 300 s each, four runs in this order: off, on, off, on. Close other programs, and don't touch the game (the press is scripted).

$env:XCL_PREPARE = '0'          # caches are warm; keeps preparation out of both sides
$env:XCL_PRESS_AT = '25:A'      # the same scripted press on both sides
$env:XCL_LOOK_STATS = '1'       # the per-look lines (1, not 2: 2 adds timing of its own)

$env:XCL_LOOK_AHEAD = '0'
.\scripts\smoke.ps1 -Game '<your title folder>' -Seconds 300 -OutDir .\la\off-1
Remove-Item Env:XCL_LOOK_AHEAD
.\scripts\smoke.ps1 -Game '<your title folder>' -Seconds 300 -OutDir .\la\on-1
$env:XCL_LOOK_AHEAD = '0'
.\scripts\smoke.ps1 -Game '<your title folder>' -Seconds 300 -OutDir .\la\off-2
Remove-Item Env:XCL_LOOK_AHEAD
.\scripts\smoke.ps1 -Game '<your title folder>' -Seconds 300 -OutDir .\la\on-2

In each "on" log, check for the line XCL_LOOK_AHEAD: a thread takes the written pages every 2 ms. Check that the "off" logs don't have it.

What to paste back

  1. The four xcl-smoke blocks, as printed.
  2. The look and submit lines of each run:
    foreach ($r in 'off-1','on-1','off-2','on-2') {
      "== $r"
      Select-String -Path ".\la\$r\xcl.log" -Pattern 'submit cost, average of 1024','the last 256 looks for CPU writes' |
        Select-Object -Last 6 | ForEach-Object Line
    }
    
    Paste the full output, or attach the four logs.
  3. GPU and driver version, CPU (cores/threads), RAM, Windows build, rustc version, and roughly where the title was at the end (menu, loading, in the world).

How it will be read

  • The look's share of each submit (look in the submit-cost lines) and ms a look should drop with look-ahead on.
  • Frames in 300 s should not drop. A gain that only shows in the look lines but not in the frames, or that costs frames, counts against the default.
  • found ahead shows how much of the work the thread took off the submit.

Most needed: AMD RDNA2/3/4 (the maintainer measures on RDNA4), and CPUs with more cores than ours (the per-page cost grows with the cores a title runs on). NVIDIA results are welcome too.

Our environment: NVIDIA GeForce RTX 2070 SUPER, driver 621.40, AMD Ryzen 5 3600XT, 32 GB, Windows 11 Home build 26300, rustc 1.100.1.

Written by Claude Code (Claude Opus 5.5).

<!-- greyfinch-sync:ivall/xcl:comment:7259540585 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3436#issuecomment-7259540585). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-29T17:14:57Z. --- **Results request: does look-ahead at 2 ms help a real title?** Thanks @andrewDoing for the synthetic run. It shows that no page is lost. Its gain can't carry over to a game: it was a debug build (sorting is slow there, the scan is kernel time and is not), and a one-thread process in one 32 MiB allocation pays about 0.03 µs a page for the scan, where a retail game pays about 0.5 µs (the reset flushes every core the title's threads run on). The data this PR needs comes from a retail title in a release build, with look-ahead off and on. Background: on main d8bd9a38 the looks for written pages before each submit took a mean of 8.8 % of wall time in menus and 14–16 % in 300–600 s runs (RTX 2070 SUPER, retail game). A run of our own is queued and will be posted here too. **What is compared:** one build of this PR's head, `0ef9307a`. `XCL_LOOK_AHEAD=0` (off, as on main) against `XCL_LOOK_AHEAD` unset (the new default, 2 ms). Use the same exe for both sides so that the shader caches are shared. **Build** ```powershell git fetch https://github.com/KOLESNiii/xcl d3d12x-look-ahead-default git checkout 0ef9307a cargo build --release -p xcl ``` Release only, not debug. Note your `rustc --version`. **Warm-up (not measured):** one run with startup preparation on, so that the shaders your title uses are compiled and cached: ```powershell .\scripts\smoke.ps1 -Game '<your title folder>' -Seconds 300 -StartupTimeoutSeconds 7200 -OutDir .\la\warmup ``` **Measured runs:** the same title and the same 300 s each, four runs in this order: off, on, off, on. Close other programs, and don't touch the game (the press is scripted). ```powershell $env:XCL_PREPARE = '0' # caches are warm; keeps preparation out of both sides $env:XCL_PRESS_AT = '25:A' # the same scripted press on both sides $env:XCL_LOOK_STATS = '1' # the per-look lines (1, not 2: 2 adds timing of its own) $env:XCL_LOOK_AHEAD = '0' .\scripts\smoke.ps1 -Game '<your title folder>' -Seconds 300 -OutDir .\la\off-1 Remove-Item Env:XCL_LOOK_AHEAD .\scripts\smoke.ps1 -Game '<your title folder>' -Seconds 300 -OutDir .\la\on-1 $env:XCL_LOOK_AHEAD = '0' .\scripts\smoke.ps1 -Game '<your title folder>' -Seconds 300 -OutDir .\la\off-2 Remove-Item Env:XCL_LOOK_AHEAD .\scripts\smoke.ps1 -Game '<your title folder>' -Seconds 300 -OutDir .\la\on-2 ``` In each "on" log, check for the line `XCL_LOOK_AHEAD: a thread takes the written pages every 2 ms`. Check that the "off" logs don't have it. **What to paste back** 1. The four `xcl-smoke` blocks, as printed. 2. The look and submit lines of each run: ```powershell foreach ($r in 'off-1','on-1','off-2','on-2') { "== $r" Select-String -Path ".\la\$r\xcl.log" -Pattern 'submit cost, average of 1024','the last 256 looks for CPU writes' | Select-Object -Last 6 | ForEach-Object Line } ``` Paste the full output, or attach the four logs. 3. GPU and driver version, CPU (cores/threads), RAM, Windows build, rustc version, and roughly where the title was at the end (menu, loading, in the world). **How it will be read** - The look's share of each submit (`look` in the submit-cost lines) and `ms a look` should drop with look-ahead on. - Frames in 300 s should not drop. A gain that only shows in the look lines but not in the frames, or that costs frames, counts against the default. - `found ahead` shows how much of the work the thread took off the submit. **Most needed:** AMD RDNA2/3/4 (the maintainer measures on RDNA4), and CPUs with more cores than ours (the per-page cost grows with the cores a title runs on). NVIDIA results are welcome too. **Our environment:** NVIDIA GeForce RTX 2070 SUPER, driver 621.40, AMD Ryzen 5 3600XT, 32 GB, Windows 11 Home build 26300, rustc 1.100.1. Written by Claude Code (Claude Opus 5.5).
Aniseto commented 2026-11-29 18:17:51 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Aniseto on 2026-11-29T18:17:51Z.


Ran the texture-look-ahead test group at 0ef9307a on an NVIDIA Blackwell desktop part, with a control run on main.

System

  • GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, mesh shaders), driver 32.0.16.2140 (621.40)
  • CPU: Intel Core i5-12400F, 64 GB RAM
  • OS: Windows 11 Pro build 26200 x64
  • Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5
  • Build: debug

Results

  • PR head 0ef9307a, XCL_ADAPTER=NVIDIA cargo test -p xcl --lib title_textures::tests:: -- --test-threads=1: 62 passed, 4 failed, 1 ignored (exit 101).
  • Control main 0fe06eb0, same command: 62 passed, 4 failed, 1 ignored (exit 101).

What this adds
The four failures are the same on both trees: placed_title_textures_share_vram_and_preserve_pixels and the three stream_recheck_* tests. This run adds no new failure relative to main and is the first datapoint from an RTX 5070 Ti in the thread. The PR's own unit tests for the 2 ms default are inside the 62 passes. No title run was made, so the requested A/B on presented frames is still open.

Not tested
A retail title, the FPS/look-share A/B, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - ran the commands above on this machine and wrote this report; no game data was used.

<!-- greyfinch-sync:ivall/xcl:comment:7260369819 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3436#issuecomment-7260369819). Originally posted by [Aniseto](https://github.com/Aniseto) on 2026-11-29T18:17:51Z. --- Ran the texture-look-ahead test group at `0ef9307a` on an NVIDIA Blackwell desktop part, with a control run on `main`. **System** - GPU: NVIDIA GeForce RTX 5070 Ti (Blackwell, 32-lane waves only, mesh shaders), driver 32.0.16.2140 (621.40) - CPU: Intel Core i5-12400F, 64 GB RAM - OS: Windows 11 Pro build 26200 x64 - Toolchain: rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5 - Build: debug **Results** - PR head `0ef9307a`, `XCL_ADAPTER=NVIDIA cargo test -p xcl --lib title_textures::tests:: -- --test-threads=1`: 62 passed, 4 failed, 1 ignored (exit 101). - Control `main` `0fe06eb0`, same command: 62 passed, 4 failed, 1 ignored (exit 101). **What this adds** The four failures are the same on both trees: `placed_title_textures_share_vram_and_preserve_pixels` and the three `stream_recheck_*` tests. This run adds no new failure relative to `main` and is the first datapoint from an RTX 5070 Ti in the thread. The PR's own unit tests for the 2 ms default are inside the 62 passes. No title run was made, so the requested A/B on presented frames is still open. **Not tested** A retail title, the FPS/look-share A/B, a paired smoke run, the full workspace suite, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data. AI-assisted (OpenCode), model: **DeepSeek V4.1 Flash Free** - ran the commands above on this machine and wrote this report; no game data was used.
KOLESNiii commented 2026-11-29 19:11:07 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-29T19:11:07Z.


Result: no gain. This PR stops here. As its description says, it was waiting on the A/B run, and turning look-ahead on by default did not reduce the look work on the submitting thread.

Same exe (4465c886, look-ahead switchable) for every arm, warm default cache, XCL_PREPARE=0 XCL_ACTIVITY=1 XCL_LOOK_STATS=2 XCL_PRESS_AT=25:A, 300 s each, one run per arm, RTX 2070 SUPER 8 GB (driver 621.40), Ryzen 5 3600XT, retail game. The look numbers are the means of the looks before submits (2 s) windows from t ≥ 30 s (133–135 windows per arm):

arm look share of wall time, mean (max) look work on the submit thread frames shown in 300 s
A default (look-ahead off) 5.8 % (60.0 %) 115 ms per 2 s 2,590
C XCL_LOOK_AHEAD=2 (this PR's default) 6.9 % (57.6 %) 137 ms per 2 s 2,662
B XCL_LOOK_AHEAD=2 XCL_LOOK_SKIP=1 4.6 % (40.3 %) 92 ms per 2 s 2,559
  • Look-ahead was active in C: the log has XCL_LOOK_AHEAD: a thread takes the written pages every 2 ms at 2.98 s. The submit thread's look work still went up, not down.
  • C's +2.8 % frames is within run-to-run noise for one run per arm. B lowered the look work but showed no frame gain either.
  • No device removal or crash in A, C or B. A separate 180 s warm-up run of the same exe, in its default configuration, ended at 87 s with a device removal (0x887a0006). That is unrelated to this change: the default has look-ahead off.

So there is no case for this default. The switch stays opt-in on main as before. I won't push more to this branch or ask for more runs.

Claude Code (Claude Opus 5.5) wrote this comment from the run logs; the A/B run was set up and run by another Claude Code (Claude Opus 5.5) session on this machine.

<!-- greyfinch-sync:ivall/xcl:comment:7261076507 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/3436#issuecomment-7261076507). Originally posted by [KOLESNiii](https://github.com/KOLESNiii) on 2026-11-29T19:11:07Z. --- **Result: no gain. This PR stops here.** As its description says, it was waiting on the A/B run, and turning look-ahead on by default did not reduce the look work on the submitting thread. Same exe (4465c886, look-ahead switchable) for every arm, warm default cache, `XCL_PREPARE=0 XCL_ACTIVITY=1 XCL_LOOK_STATS=2 XCL_PRESS_AT=25:A`, 300 s each, one run per arm, RTX 2070 SUPER 8 GB (driver 621.40), Ryzen 5 3600XT, retail game. The look numbers are the means of the `looks before submits (2 s)` windows from t ≥ 30 s (133–135 windows per arm): | arm | look share of wall time, mean (max) | look work on the submit thread | frames shown in 300 s | |---|---|---|---| | A default (look-ahead off) | 5.8 % (60.0 %) | 115 ms per 2 s | 2,590 | | C `XCL_LOOK_AHEAD=2` (this PR's default) | 6.9 % (57.6 %) | 137 ms per 2 s | 2,662 | | B `XCL_LOOK_AHEAD=2 XCL_LOOK_SKIP=1` | 4.6 % (40.3 %) | 92 ms per 2 s | 2,559 | - Look-ahead was active in C: the log has `XCL_LOOK_AHEAD: a thread takes the written pages every 2 ms` at 2.98 s. The submit thread's look work still went up, not down. - C's +2.8 % frames is within run-to-run noise for one run per arm. B lowered the look work but showed no frame gain either. - No device removal or crash in A, C or B. A separate 180 s warm-up run of the same exe, in its default configuration, ended at 87 s with a device removal (0x887a0006). That is unrelated to this change: the default has look-ahead off. So there is no case for this default. The switch stays opt-in on `main` as before. I won't push more to this branch or ask for more runs. _Claude Code (Claude Opus 5.5) wrote this comment from the run logs; the A/B run was set up and run by another Claude Code (Claude Opus 5.5) session on this machine._

Pull request closed

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!3436
No description provided.