Skip to content

D3D12.X: an optional page budget evicts CPU-filled title textures LRU - #640

Open
LeonardoS11 wants to merge 1 commit into
xcl-dev:mainfrom
LeonardoS11:vram-page-budget
Open

LeonardoS11 wants to merge 1 commit into
xcl-dev:mainfrom
LeonardoS11:vram-page-budget

Conversation

@LeonardoS11

@LeonardoS11 LeonardoS11 commented Nov 24, 2026 •

Copy link
Copy Markdown

The title-texture pages in vram.rs (shared 64 KiB pages per title address, #248/#288) only ever grow: a page is kept while any live texture covers its address, and the pool heaps behind them are never released. A title that recycles texture memory inside its own allocator gives XCL no signal that the old textures are dead, so the pages cover every address the title ever used for textures, not what it uses now. On a retail title streaming its world after the menus, with XCL_ACTIVITY=1 and a temporary counter on a local build: the pages went from 3.6 GB in the menus to 9.7 GB (8.6 GB shared + 1.1 GB extra tiles, 62 k live targets) while the title's own crash context reported 3.6 of its 6.2 GB texture heap in use; local video memory reached 13.7 GB on a 12 GB card, frames dropped to 2–3 fps and the title's stall watchdog (+0x2215c35, #232) ended it. Related: #320, #345, #292 (a different approach: retiring overwritten placements).

This adds an opt-in budget, XCL_PAGE_BUDGET_MB. Unset or 0 keeps today's behaviour.

What is in it

  • crates/xcl/src/hle/d3d12x/vram.rs: pool_cap() turns the budget into a number of 64 MB pool heaps (kept per Pages as cap, so tests can set it). At the cap, take_tile takes the tiles the last eviction round gave back first; only when there are none does it call evict_lru, which unmaps the least recently touched evictable textures until 512 tiles came back. A round that finds nothing to evict is not repeated for a second (EVICT_IDLE), and the pools grow past the budget meanwhile. Evictable: only textures title_textures keeps in step with the title's memory (set_evictable from register), of 4 tiles or more, not placed, remapped, transitioned or uploaded in the last 5 s, and not written by the GPU (pin). Pages another mapped texture still shares stay. revive maps an evicted texture again and takes it out of the evicted set only when that worked. The budget needs late release (XCL_LATE_RELEASE=0 turns it off with a warning): evicting unmaps a texture from another thread, which is safe only while a texture's last Release reaches vram::forget before the object goes.
  • crates/xcl/src/hle/d3d12x/title_textures.rs: evicted textures are mapped again before the work that uses them. revive_listed runs before a submit, ahead of refresh, for the textures its lists transition (references taken under the TEXTURES lock), and marks them pending so this submit's refresh uploads them whole. A texture written again by the CPU is mapped again in refresh_once before its upload (if that fails it stays evicted and is not uploaded). A copy into an evicted texture maps it again when it is recorded (note_gpu_write), with no upload over what the GPU writes. Uploads and submitted transitions refresh the LRU time. forget_content drops the D3D12.X: a title texture whose memory is as at its last upload is not uploaded again #486 content hash of a texture mapped again so the unchanged-upload skip does not leave its fresh tiles empty.
  • crates/xcl/src/hle/d3d12x/real.rs, list_x.rs: call revive_listed before refresh in ExecuteCommandLists and KickoffX (in KickoffX the refresh moved after reclaim_for_kickoff, which only does bookkeeping, so the segments split before it are covered).
  • crates/xcl/src/host.rs: one page budget: N textures evicted, M mapped again line next to the XCL_ACTIVITY memory line, only once something was evicted.

Changes since the review (thanks @mastrr9, @iggyvilla and the review above): eviction no longer repeats for every tile of a placement at the cap; textures are mapped again before the submit that uses them instead of after it; a failed remap keeps the texture evicted; no vram code dereferences a key of a texture that may be gone (late release required, references cloned under the lock in the revive path); uploads refresh the LRU time; textures title_textures refused are never evicted; a copy into an evicted texture maps it first; pin/touch return at once with the budget off.

Known limit: XCL does not see the title read a texture, only write, copy into or transition it. An evicted texture the title still samples without any of those reads as zero (tier-2 unmapped tiles) until one happens, and a draw already queued may read zero or, at the cap, the newer texels of a reused tile for a frame. That is why the budget is opt-in.

Tested

  • NVIDIA GeForce RTX 3080 Ti (12 GB, 32-lane waves), AMD Ryzen 9 5900X, 64 GB; Windows 11 Pro 26200; Rust stable-x86_64-pc-windows-msvc; DXC 1.8.2502.11 (Windows SDK 10.0.26100).
  • cargo build --workspace && cargo test --workspace -- --test-threads=4 (debug) on 5d6fac8: 744 passed, 0 failed, 41 ignored. The three tests, all GPU:
    • page_budget_evicts_the_least_recently_touched_cpu_filled_texture (vram.rs): the oldest evictable texture goes first, its pages go back, a GPU-written one stays, a round with nothing evictable returns 0, an evicted one maps again once.
    • page_budget_one_placement_at_the_cap_evicts_one_batch (vram.rs): 40 textures of 16 tiles, pools at the cap with no spare tile, one more texture placed: the 32 oldest (one batch of 512 tiles) are evicted and the rest stay. It fails without the take-the-batch-first change (40 evicted).
    • page_budget_an_evicted_texture_is_mapped_again_before_the_work_that_uses_it (title_textures.rs): an evicted texture a list transitions is mapped again by revive_listed, pending, its content hash forgotten; a copy recorded into an evicted texture maps it again with no upload pending.
  • SKIPPED on this adapter: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64).
  • Retail title with XCL_PAGE_BUDGET_MB=6144, XCL_NETWORK=0, XCL_ACTIVITY=1, walked through the menus into its first world load. These runs were on a local build that also carried other open PRs (D3D12.X: a slow graphics pipeline waits at most 4 s once per build (#232) #267, D3D12.X: bound compute pipeline waits so slow compiles do not trip wa… #533, Memory: decommitted sparse tiles stay mapped until the next submit #532, Memory: a freed sparse block is decommitted before its address is reused #348) and local diagnostics, not on this branch alone, so they show what the budget does, not this branch's numbers: pages held at 4.6–6.0 GB and local video memory at 10.1 GB (13.7 GB without the budget), 9,791 textures evicted and 1,094 mapped again over 456 s, 30 fps in the menus, the world's geometry drawn. The title still stops at the Retail title: null write at +0x2215c35 (#159) still hits on NVIDIA RTX 4070 Ti, with and without XCL_NETWORK=0 #232 watchdog later on this machine, for compile stalls this PR does not address.

Regression run

Same title, 60 s, no input, budget unset (the default this PR keeps).

main:

xcl-smoke v1
commit: 47efa2ecea0a12934719ae69b81930cf02a4b1c3
gpu: NVIDIA GeForce RTX 3080 Ti
title: Jogo
seconds: 60
exit: 0x0
frames shown: 1290 (PresentX 1290)
presents per 2 s (last 3): 60 41 4
device removals: 0
crashes: 0
peak commit: 16156 MB

this PR:

xcl-smoke v1
commit: 5d6fac8cb6c1ccddf95adc273862e5cb4be5ae2a
gpu: NVIDIA GeForce RTX 3080 Ti
title: Jogo
seconds: 60
exit: 0x0
frames shown: 1429 (PresentX 1429)
presents per 2 s (last 3): 60 60 36
device removals: 0
crashes: 0
peak commit: 18100 MB

Both runs drop presents in their last seconds, the main run more than this PR's, so the drop is not from this PR (on this main the recompiler output changed, and the title's shaders were compiling again).

Not tested

  • AMD and Intel GPUs; cards with less video memory.
  • This branch alone with the budget set on the retail title (only on the local build above). A 60 s run without input stays in the menus, where the pages (about 3.6 GB) never reach a budget, so the regression run does not exercise eviction.
  • Whether textures evicted and never rewritten, copied into or transitioned show up empty in a visible place: the runs above did not look for it.
  • The review fixes on the retail title with the budget set: only the unit tests and the regression run (budget unset) above ran on 5d6fac8.

AI use

  • Claude Code with Claude Opus 5.5: measured the growth, wrote the code, the two tests and this description, and ran the tests and the regression runs on the hardware above. Opened as a draft until I have reviewed the diff myself.

🤖 Generated with Claude Code

@LeonardoS11
LeonardoS11 marked this pull request as draft November 24, 2026 02:48
@LeonardoS11
LeonardoS11 marked this pull request as ready for review November 24, 2026 02:50
@LocranKing

Copy link
Copy Markdown

Tested on NVIDIA GeForce RTX 3060 Ti (8 GB, wave32).

Tested

  • Commit: 38bf6a324ac3d11387b81592f3dd5fd6fe38ddac (pr-640, clean tree)
  • Hardware / software: Windows 11 Home Build 26200, Ryzen 5 5500, 31.8 GB RAM, RTX 3060 Ti (8024 MiB VRAM, driver 32.0.16.2101), rustc 1.100.0 (x86_64-pc-windows-msvc, MSVC 14.44.35207), DXC 1.9.2602.17 (SDK 10.0.26100.0), --release
  • cargo test --workspace --release --no-fail-fast -- --test-threads=4: 688 passed, 0 failed, 41 ignored, exit 0; 2 (no wave64) skipped (gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware)

Regression run (scripts/smoke.ps1, 60 s, XCL_NETWORK=0, title folder name redacted)

main (dd2ae9a):

xcl-smoke v1
commit: dd2ae9a70af5eb5aad60f02d86e386b72abe1e95
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1525 (PresentX 1525)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14720 MB

PR #640 (38bf6a3, XCL_PAGE_BUDGET_MB unset):

xcl-smoke v1
commit: 38bf6a324ac3d11387b81592f3dd5fd6fe38ddac
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1573 (PresentX 1574)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14718 MB

PR #640 (38bf6a3, XCL_PAGE_BUDGET_MB=2048):

xcl-smoke v1
commit: 38bf6a324ac3d11387b81592f3dd5fd6fe38ddac
gpu: NVIDIA GeForce RTX 3060 Ti
title: retail-1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1540 (PresentX 1540)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14583 MB
  • With XCL_PAGE_BUDGET_MB=2048, xcl.log reported page budget: 92 textures evicted, 0 mapped again, target pages 3403 MB (pools 3456 MB) and 6016 MB local VRAM at 58 s (down from 3577 MB / pools 3584 MB and 6144 MB local on main).

Not tested: Walking past the start/menu screens into world streaming, debug build, XCL_SAMPLE_* tests on this branch, AMD / wave64.

AI use: Antigravity (Gemini 4 Hydrogen) ran the builds, tests, and smoke runs and drafted this report from the actual command outputs and logs.

@thatirishguyyy

Copy link
Copy Markdown

Independent Windows Radeon comparison on 38bf6a3, RX 9070 XT (driver 32.0.32029.2010), release. Both focused regressions passed, including GPU eviction and re-upload after eviction.

I ran the same binary and saved profile with XCL_PAGE_BUDGET_MB=0 and 4608. Starting available system commit differed by about 78 MiB. At the final logged streaming sample, the texture pool was 5,184 MiB off / 4,672 MiB on, local video memory 8,653 / 8,212 MiB, and process commit 19,159 / 19,051 MiB. The budget run evicted 554 textures and remapped 11. Both runs ended at an external 5 GiB system-commit guard during world streaming. One pair does not establish a performance difference.

AI-assisted (Codex ran and summarized the measurements).

@albertoglvn

Copy link
Copy Markdown

8 GB data point with the budget set. Native Windows 11, RTX 4060 Laptop 8 GB (7956 MiB), driver 621.24, 15 GB RAM + 40 GB page file, release MSVC build. The newer retail title (TitleID 7952987A), Series X profile, XCL_NETWORK=0, XCL_ACTIVITY=1, XCL_PAGE_BUDGET_MB=4096. Build: #484 head (9783066) with #495 (3ae0841), #496 (409f40f) and this PR (38bf6a3) cherry-picked on top. They applied cleanly. cargo test --lib -p xcl -- title_textures:: vram:: passes (18 passed).

Compared with the same base without this PR (#333 comment, one run each):

without budget budget 4096 MB
ended at 277.5 s, #333 assert (+0x193e00f, E_OUTOFMEMORY) 320.9 s, +0x23cf683 write at 0 (watchdog, #232)
"no video memory for more pages" 9 0
target pages, peak 6623 MB 5306 MB
page pools, peak 6656 MB 5312 MB
sparse pools, peak 1792 MB 1984 MB
local video memory, peak 10207 MB 9207 MB

Evictions: 561 by 160 s, 8714 by 280 s (824 mapped again). None after 280 s.

Observations:

  • The cap is soft on this title. The pools went to 83 heaps against a cap of 64, because when evict_lru frees nothing, take_tile makes another pool. So most of what was added past 4 GB was not evictable (GPU-written, pinned, under 4 tiles, or touched within 5 s). Sparse pools grow outside the budget (+1 GB here).
  • Frame rate: from 160 s, when local video memory went past the card's size, it ran mostly at 0–5 presents per second until the end. I can't tell from one run how much of that is eviction, paging and streaming, and how much is compile stalls. From 294 s to the end there were no presents at all, while large compute PSOs were still being built (up to 390 KB of DXIL), then the watchdog fired. That matches the Retail title: null write at +0x2215c35 (#159) still hits on NVIDIA RTX 4070 Ti, with and without XCL_NETWORK=0 #232 stop described above.
  • Missing textures: some textures were visibly missing during play. That fits the known limit in the description: an evicted texture the title only samples reads as zero. I didn't check which textures they were.

So on 8 GB this takes the run past the out-of-memory stop to the same watchdog stop that larger cards reach. A budget taken from the adapter's QueryVideoMemoryInfo local budget, minus what XCL uses outside the pages, might keep the total under the card's size better than a fixed number. I haven't tried that.

AI use: the logs were analysed and this comment drafted with Claude Opus 5.5; I ran the game and checked the results.

@albertoglvn

Copy link
Copy Markdown

Follow-up to my run above: the same build without XCL_PAGE_BUDGET_MB (#484 + #495 + #496 + this PR, so this PR's code is in but the budget is off). Same machine, same profile.

budget 4096 MB no budget
play starts (~60 presents / 2 s) ~140 s ~122 s
frames collapse (≤ 10 presents / 2 s) ~160 s, local 7.9 GB ~140 s, local 8.3 GB
ended at 320.9 s, watchdog (+0x23cf683) 160.1 s, #333 assert (+0x193e00f, 12× "no video memory")
target pages / sparse / local at the end 5306 / 1984 / 9207 MB 6638 / 1792 / 10204 MB

So the frame collapse is not caused by the eviction. Both runs drop to almost no frames about 20 s into play, once local video memory goes past the card's 7956 MiB. With the budget, the run then keeps going for another 160 s instead of failing CreateHeap within 20 s.

At the menus, local video memory outside the target pages and sparse pools is about 1.7 GB (6139 − 3577 − 896 MB). To stay under 8 GB, pages + sparse would have to stay below roughly 6 GB, but the run above had 5.3 + 2.0 GB, and about 3.6 GB of the pages are already in use at the menus. So on the Series X profile, an 8 GB card would need the cap enforced more strictly, which means more missing textures.

(One other run of this build crashed at 13 s inside the NVIDIA driver, nvwgf2umx.dll+0x85b227, read at 0x3c, the same place as in #345, while shaders were loading and before any eviction. The rerun was fine, so I'm treating it as intermittent.)

AI use: the logs were compared and this comment drafted with Claude Opus 5.5; I ran the game.

@crosettiremi

crosettiremi commented Nov 24, 2026 •

Copy link
Copy Markdown

Paired native Windows 11 runs on an RX 7900 XT (20 GB), retail 1.0.2.1, DXC 1.9.2602.17. I applied the budget change to a local integration build that also includes #690, bounded PSO waits and sparse-buffer release changes. Both runs used the same release executable, saved profile, A at 37 s, DRED, and separate copies of the same starting application caches (1,062 prior-use shader sets). The driver cache was shared. The 6 GiB run went first. CPU compilation overlapped parts of both runs, so I am reporting memory and outcomes only.

Activity sample near 148 s 6,144 MiB budget Budget off
Texture pools 6,336 MiB 10,112 MiB
Active target pages 5,453 MiB 9,737 MiB
Local video memory 10,225 MiB 14,069 MiB
Process commit 25,149 MiB 28,877 MiB

With the budget on, the last sample reported 8,175 textures evicted and 1,045 mapped again. The budget run ended at 159.855 s with an access violation in the title. The control ended at 157.917 s with an access violation in vcruntime140 on a thread processing audio. Both passed the account picker and streamed world assets. Neither reached verified playable frames. Zero device removals in both. These runs show a smaller memory footprint, but do not establish a cause for either crash or whether evicted textures rendered correctly.

Combined workspace suite: 724 passed, 0 failed, 41 ignored. Upstream change tested: 38bf6a3. Workspace command: cargo test --workspace --locked --offline -- --test-threads=4. Codex (GPT-6) ran the checks and summarized the local logs.

@mastrr9

mastrr9 commented Nov 24, 2026

Copy link
Copy Markdown

Code audit + NVIDIA RTX 5080 test run on 38bf6a324ac3d11387b81592f3dd5fd6fe38ddac:

Three bugs found in the revive path

  1. Use-after-free in title_textures::submitted (title_textures.rs:585-591):
    • revive collects raw usize resource addresses from notes (recorded when the command list was built) and calls ID3D12Resource::from_raw_borrowed(&p) -> vram::remap_if_unmapped(r) without holding TEXTURES.lock() or cloning a COM reference.
    • If another thread calls Release / forget(res) between recording/taking res and remap_if_unmapped(r), r.GetDevice(...) dereferences a freed COM object.
    • Fix: Clone live COM references under TEXTURES.lock() via clone_resources(&revive) (matching forget()) before calling remap_if_unmapped.
  2. Current submission still samples NULL tiles (real.rs:5028-5034 + title_textures.rs:573-599):
    • title_textures::submitted(&mapped) is called after ExecuteCommandLists has already submitted the command lists to the GPU, and only marks e.pending = true for the next submit. So the submission that actually transitions and draws with the revived texture still samples unmapped NULL tiles on that frame.
    • Reviving + uploading evicted textures referenced by lists before ExecuteCommandLists (inside refresh) would avoid the blank frame.
  3. take_evicted drops the entry even when remap_if_unmapped returns false (title_textures.rs:581, 799):
    • If remap_if_unmapped fails (returns false), res was already removed from EVICTED and REMAPS was already incremented, leaving the texture permanently unmapped and never retried.
    • (Minor perf note: any_evicted() acquires the EVICTED mutex and touch(res) acquires the global PAGES mutex per barrier note when XCL_PAGE_BUDGET_MB > 0; an AtomicUsize count for any_evicted() and batching touch calls under one PAGES lock would avoid lock churn.)

Tested

  • Hardware / OS / toolchain: NVIDIA GeForce RTX 5080 (driver 617.42), AMD Ryzen 7 9800X3D, Windows 11 25H2 (build 26200.9711), rustc 1.100.0 (MSVC), debug build.
  • cargo build --workspace && cargo test --workspace -- --test-threads=4: 688 passed, 0 failed, 41 ignored.
  • New tests a_texture_mapped_again_after_eviction_is_uploaded_even_if_unchanged and page_budget_evicts_the_least_recently_touched_cpu_filled_texture: both passed.
  • SKIPPED GPU/D3D12 tests: gpu_geometry_wave32_prefix_count_over_a_mask / gpu_wave32_program_in_wave64_hardware (no wave64), plus 2 D3D12 debug-layer tests (no d3d12SDKLayers.dll).

Not tested

  • Retail title / scripts/smoke.ps1 run (test suite only).
  • AMD / Intel GPUs.

AI use: code review and test run orchestrated with Antigravity (Gemini 4 Neon) on the hardware listed above.

@albertoglvn

Copy link
Copy Markdown

One more data point, about what the LRU order sees on this title. Same machine (RTX 4060 Laptop 8 GB). Build: main f4ce27c + #495 + #496 + this PR, budget off, plus a local measurement patch: touch() also runs without a budget and counts transitions per target; every 10 s it logs the mapped targets by evictable, EVICT_MIN_TILES, age of touched, and touches == 0. Tiles are summed per texture, so shared pages count twice.

At 62 s, just before #333's out-of-memory stop at 63.5 s:

textures on pages MB textures
GPU-written or GPU-owned (never evicted) 3339 917
under 4 tiles (never evicted) 942 14490
CPU-filled, touched < 5 s 2069 1419
CPU-filled, 5–30 s 1546 701
CPU-filled, 30–120 s 584 188
CPU-filled with no transition since placement 4200 2308

So on this title, every CPU-filled texture on the pages (the age rows add up to the same 2308 textures) has never appeared in a submitted transition. Their touched is only the placement time, so evict_lru evicts the textures placed longest ago, whether or not they are still sampled. Nothing maps them back either, since take_evicted is only reached from a transition or a CPU write. That fits the missing textures I saw with the budget. Some signal of use other than transitions seems to be needed here, such as descriptor creation for the resource, or its being referenced by a list that was submitted.

The same counts at 32 s (menus, before streaming) show that most of the floor is GPU-written: 3367 MB of 3598 MB of target pages. With 1.1 GB of committed resources (buffers 571 MB, UAV textures 419 MB, two 3840×2160 display targets), 465 MB of arenas and 1–1.8 GB of sparse pools, that leaves about 1 GB of an 8 GB card for CPU-filled textures on the Series X profile. The driver's share of the local count, outside heaps and committed resources, was only about 136 MB.

AI use: the measurement patch and this comment were written with Claude Opus 5.5; I ran the game.

burber added a commit to burber/xcl that referenced this pull request Nov 24, 2026
… card, no out-of-order waits; first builds of world compute pipelines remain

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@pvfreis pvfreis left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review of #640: D3D12.X: an optional page budget evicts CPU-filled title textures LRU

Read at 38bf6a3 against merge base 3db536e. Code read only; nothing built or run.

With XCL_PAGE_BUDGET_MB unset, the eviction path is unreachable (pool_cap() == 0), and I found no
lock-order problem (PAGES → EVICTED only; TEXTURES is dropped before every vram call). The
points below are about the budget-on path, apart from 5. They do not repeat the three revive-path
points already posted on the PR (borrowed pointer in submitted, remap after ExecuteCommandLists,
take_evicted consumed when the remap fails).

Findings

1. CONFIRMED: at the cap, every tile taken starts another 512-tile eviction round

crates/xcl/src/hle/d3d12x/vram.rs:289-306 (take_tile), :410-434 (evict_lru).

evict_lru gives tiles back through release_tiles(.., true), which pushes them to cooling with
the time now, never to free. So the self.free.pop() at :299 after the eviction is always
None, and take_tile returns one tile from cooling.pop_front() (:304).

bind calls take_tile once per tile. On the next call free is still empty, the front of
cooling is not yet 2 s old (:293), the pools are still at the cap, so evict_lru(EVICT_BATCH)
runs again (:298) although cooling still holds about 511 tiles from the round before. before
(:412) is taken inside evict_lru, so each round wants 512 more tiles.

Scenario: pools at the cap, a new 4 MiB texture (64 tiles, none shared) is placed. Result: 64 rounds
asking for 64 x 512 = 32,768 tiles (2 GiB), bounded only by what is eligible. In practice one
placement at the cap evicts every CPU-filled texture of 4+ tiles not touched for 5 s, not one batch.
Each round also scans and sorts all of targets under the PAGES lock. This fits the eviction
counts reported in the comments (8,000 to 9,800 textures) and the missing textures.

Suggested fix: at the cap, take from cooling first and evict only when both free and cooling
are empty, for example:

if cap > 0 && self.pools.len() >= cap {
    if self.cooling.is_empty() {
        self.evict_lru(EVICT_BATCH);
    }
    if let Some((t, _)) = self.cooling.pop_front() {
        return Some(t);
    }
}

2. CONFIRMED: an upload does not refresh the LRU time, so a texture just written is evictable

crates/xcl/src/hle/d3d12x/title_textures.rs:771-805 (refresh_once), vram.rs:654-664 (touch).

touched is set on placement (vram.rs:582), on remap (:632) and from submitted for
transitions (title_textures.rs:580). The CPU-write path (refresh_once → upload_all) never
calls touch for a texture that is still mapped.

Scenario: a texture is placed at t = 0 and stays in a shader-resource state. The title streams mips
into its memory at t = 6 s; the submit uploads them. A placement at the cap in the same frame sees
touched = t = 0, so this texture is among the first evicted, right after its upload. It then reads
as zero until the title writes or transitions it again. For a title that does not transition its
sampled textures, the order is creation order, not use order.

Suggested fix: in refresh_once, call vram::touch for each entry of todo (one PAGES lock for
the batch would be better than one per texture).

3. LIKELY: a GPU copy into an already-evicted texture is lost, and some evictable textures can never come back

vram.rs:582 (evictable: !require_aligned), vram.rs:669-677 (pin),
title_textures.rs:459-469 (note_gpu_write), :592-599 (revive in submitted).

a) pin only clears evictable. If the texture is already evicted when the title records
CopyTextureRegion / CopyResource into it, it stays unmapped: the copy goes to NULL tiles. After
the submit, submitted revives it and sets e.pending = true without looking at e.gpu_written
(:594-597), and refresh_once uploads pending entries before its gpu_written check (:776-781).
So the stale CPU view is uploaded over a texture whose contents the title's memory does not hold (the
case note_gpu_write's comment describes: an atlas that is zeros in memory). Table::remove
already guards this at :263 (if !e.gpu_written).

b) Every place_pages texture is evictable, including those title_textures::register then
refuses (device_x.rs:911: console formats 116 / 117, textures without texels or with more than one
plane). They are not in TEXTURES, so note_transitions drops their transitions (:548) and
refresh_once never lists them: once evicted, nothing maps them again, and a later GPU copy into
them is lost for good.

Whether a title hits either depends on it creating such a texture more than 5 s before the first
GPU copy into it while the pools are at the cap; I could not check that.

Suggested fix: default evictable to false and set it only when register succeeds; in pin, map
an evicted target again at record time (the title queue waits for the mapping in before_execute)
and remove it from EVICTED; in the revive loop, do not set pending when e.gpu_written.

4. CONFIRMED: the two tests do not cover the paths the description names

vram.rs:1019-1071, title_textures.rs:1196-1204.

  • a_texture_mapped_again_after_eviction_is_uploaded_even_if_unchanged only checks that removing a
    key from LAST_CONTENT makes same_as_last_upload return false. No eviction, remap or upload
    happens in it, so it would still pass if submitted / refresh_once stopped calling
    forget_content.
  • page_budget_evicts_... calls evict_lru(1) directly. Nothing drives take_tile at the cap
    (pool_cap() is a OnceLock read from the environment), which is where finding 1 is.

Suggested fix: give Pages a cap that tests can set, place textures past it and assert how many are
evicted for one placement; extend gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes
(it already has read_r8) to evict a texture, revive it with unchanged memory and read the texels
back.

5. CONFIRMED (minor, default path): pin takes the PAGES lock with the budget off

title_textures.rs:469, vram.rs:669-677.

touch returns early when pool_cap() == 0; pin does not. With the option unset, every
CopyTextureRegion and CopyResource the title records now takes the global PAGES mutex (held
by bind across CreateHeap and UpdateTileMappings) and looks the resource up. Results are
unchanged, but it is new work and contention on the default path.

Suggested fix: the same if pool_cap() == 0 { return; } as in touch.

Verdict

Not ready with the budget on: finding 1 makes one placement at the cap evict nearly everything
eligible, and 2 and 3 make the wrong textures go or not come back; the default-off path is unchanged
apart from the extra lock in 5.

Review by Claude Code (Claude Fable 5.2); each point checked by a person before posting.

gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 24, 2026
…-watch merge

Integrates upstream PRs ivall#594, ivall#640, and ivall#551:
- Order reserved-texture tile unmaps behind known title queues with GPU
  fences before releasing tiles back to pools (ivall#594).
- Add opt-in XCL_PAGE_BUDGET_MB to evict LRU CPU-filled title textures
  when texture page pools hit the cap, remapping and re-uploading on use
  (ivall#640), preventing unbounded VRAM growth during world streaming.
- Merge write-watch scan gaps up to 64 MiB and clip regions with binary
  search to cut GetWriteWatch overhead during streaming (ivall#551).
@burber

burber commented Nov 24, 2026

Copy link
Copy Markdown

Second 12 GB NVIDIA card with the retail title: the budget keeps local video memory under the card

Setup: RTX 4070 Ti 12 GB (driver 32.0.16.1062), i5-13600K, 32 GB RAM + 32 GB page file, Windows 11 26300, DXC 1.8.2502. Release build of main 9182f27 + #533 + #267 + #708 + this PR; it merged cleanly. Title 1.0.2.1, XCL_NETWORK=0, same scripted input each run, world loading from ~80 s.

Tests: cargo test --release --workspace gives 669 passed, 0 failed. That includes page_budget_evicts_the_least_recently_touched_cpu_filled_texture and a_texture_mapped_again_after_eviction_is_uploaded_even_if_unchanged.

Retail runs:

without the budget (runs 13–14) XCL_PAGE_BUDGET_MB=6144 (runs 15–16)
local video memory at the end 14.2–14.6 GB 10.3–10.4 GB
target pages 9.7 GB 5.5–5.8 GB (pools 6.1–6.3 GB)
commit 28–30 GB 25.7–26.1 GB
evictions — 7316 textures evicted, 42 mapped again
  • I saw no visible corruption in the frame dumps before the stall. These are coarse quarter-size dumps of the loading screens only; no gameplay was reached.
  • Both budget runs still end at the title's watchdog (+0x23cf683, ~128 s). It follows 10–13 compute pipelines that are still building after 4 s on the NVIDIA driver, so the budget removes the video memory overrun but not that stall.

Investigated with AI assistance; all numbers are from runs on my machine.

gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 24, 2026
…-watch merge

Integrates upstream PRs xcl-dev#594, xcl-dev#640, and xcl-dev#551:
- Order reserved-texture tile unmaps behind known title queues with GPU
  fences before releasing tiles back to pools (xcl-dev#594).
- Add opt-in XCL_PAGE_BUDGET_MB to evict LRU CPU-filled title textures
  when texture page pools hit the cap, remapping and re-uploading on use
  (xcl-dev#640), preventing unbounded VRAM growth during world streaming.
- Merge write-watch scan gaps up to 64 MiB and clip regions with binary
  search to cut GetWriteWatch overhead during streaming (xcl-dev#551).
@albertoglvn

Copy link
Copy Markdown

Following up on the census above. I tried a signal of use other than transitions, and measured what a page budget could free on this title at all. Same machine (RTX 4060 Laptop, 7956 MiB). Build: main f4ce27c + #495 + #496 + this PR, plus two local patches:

  1. Use by T#. dev_create_srv_x notes which shared-heap SRV index belongs to which placed texture. Once a second, xcl reads word 0 of every image T# in the console view heaps and maps it back to the texture. A texture whose T# is in a shader-visible heap gets touched = now, and an evicted one found there is mapped again and uploaded. A scan takes 2–9 ms.
  2. Eviction order. evict_lru takes textures whose T# is in no view heap first (any size, once 2 s old). It passes over a texture whose pages are all shared with other mapped textures, since unmapping it frees nothing.

With the first patch alone and XCL_PAGE_BUDGET_MB=4096, every round logged "0 MB back" and the title stopped at 62.8 s. Every candidate sat on pages another texture still used.

With both patches and the same budget:

  • Rounds freed 20, 32, 32 and 0 MB, all before 62 s. After that every candidate was passed over: 4162 MB of them in the last round.
  • 5547 textures were evicted and 1977 mapped again. Between 36 s and 58 s, while frames were still coming, I saw no missing or flickering textures. That's unlike my earlier budget runs, so the T# looks like a usable signal.
  • The out-of-memory stop moved from 63 s to 94 s, but presents fell to 0 at 62 s, so that's no more playable time.
  • Target pages still grew to 6400 MB. The GPU-written textures (3370 MB) and the small ones (about 800 MB) are already above the budget.
  • evict_lru walks the same shared textures again on every submit: the pass-over count reached 33 million. A real version would need to remember them.

Then, with the budget off, I counted each page once (no double counting of shared pages), by the strongest of its holders. At 62 s, just before the device was removed at 63 s:

pages held by MB
a GPU-written or GPU-owned texture 3200
else a CPU-filled texture whose T# is in a shader-visible heap 1737
only CPU-filled textures with their T# in no shader-visible heap 1091 (827 of it under 2 s old)
no user 0
all pages 6028

Everything else counted local at that point came to about 3950 MB: sparse pools 1856, committed 1158, arenas 465, system heaps 337, driver 136. That leaves about 4000 MB of the card for pages. The first two rows alone are 4937 MB. So even a page-level budget that gave back every page held only by textures with no T# would leave the Series X profile about 930 MB over on an 8 GB card, before the in-use textures it would have to drop. On this title, 8 GB looks out of reach for any eviction scheme. The T# signal may still help on cards with somewhat more memory.

If it's useful, I can open the T# signal as its own small PR on top of this one.

AI use: the patches, measurements and this comment were written with Claude Opus 5.5; I ran the game.

gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 24, 2026
…-watch merge

Integrates upstream PRs xcl-dev#594, xcl-dev#640, and xcl-dev#551:
- Order reserved-texture tile unmaps behind known title queues with GPU
  fences before releasing tiles back to pools (xcl-dev#594).
- Add opt-in XCL_PAGE_BUDGET_MB to evict LRU CPU-filled title textures
  when texture page pools hit the cap, remapping and re-uploading on use
  (xcl-dev#640), preventing unbounded VRAM growth during world streaming.
- Merge write-watch scan gaps up to 64 MiB and clip regions with binary
  search to cut GetWriteWatch overhead during streaming (xcl-dev#551).
@woreksami

Copy link
Copy Markdown

Test report on an 8 GB card, which Not tested lists.

Tested

budget unset (same tree without this PR) XCL_PAGE_BUDGET_MB=3072
target pages, menus 3578 MB at 14 s → 4554 MB at 38 s 3488–3497 MB from 12 s to 226 s
local video memory 6204 MB at 14 s → 7297 MB at 38 s 6078 MB from 16 s to 226 s
process commit 14543 MB at 14 s → 16310 MB at 38 s 14491 MB from 22 s to 226 s
fps 30 in the menus 30.0 in every sample from 185 s to 255 s
run ended 60–80 s (my commit watcher, < 3 GB free system commit) 271 s (same watcher)
  • With the budget, after the first button press at 229 s the title starts loading and the pages grow past the budget: 4212 MB at 250 s, 4268 MB at 264 s (pools 4288 MB). page budget: 250 textures evicted, 24 mapped again by 264 s. So on this title most of what is placed after the menus is not evictable here (GPU-written or recent), and the budget slows the growth rather than capping it.
  • No crash or device removal in the run; it was ended by my watcher, not by XCL (this machine's commit limit is 43 GB, see Newer retail game on a 32 GB machine: 31 default DXC threads and ~18 GB commit run Windows out of memory #542).

Not tested

  • Whether evicted textures show up empty on screen: nobody looked for it in this run.
  • This PR alone on main; other budgets than 3072; scripts/smoke.ps1; AMD.

AI use

  • Claude Code with Claude Opus 5.5: merged the branches, ran the tests and the title, read the logs and wrote this report from those runs.

gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 24, 2026
…-watch merge

Integrates upstream PRs ivall#594, ivall#640, and ivall#551:
- Order reserved-texture tile unmaps behind known title queues with GPU
  fences before releasing tiles back to pools (ivall#594).
- Add opt-in XCL_PAGE_BUDGET_MB to evict LRU CPU-filled title textures
  when texture page pools hit the cap, remapping and re-uploading on use
  (ivall#640), preventing unbounded VRAM growth during world streaming.
- Merge write-watch scan gaps up to 64 MiB and clip regions with binary
  search to cut GetWriteWatch overhead during streaming (ivall#551).
@thatirishguyyy

Copy link
Copy Markdown

Follow-up on the RX 9070 XT. I cherry-picked 808a8a4 onto beaa245 (7c4f641 locally), built once in release, and ran two pairs with the same profile and a 5 GiB Windows commit-headroom guard. I reversed the order for the repeat. Starting system commit headroom was within 100 MiB inside each pair.

Measurement Budget off XCL_PAGE_BUDGET_MB=4096
First BCPack refusal to process exit, original pair 20.0 s 30.6 s
First BCPack refusal to process exit, repeat pair 19.9 s 30.1 s
Last logged frame checkpoint, both pairs 900 1,200
Last sampled texture-page heap pool, both pairs 4,672 MiB 4,224 MiB
Last sampled local video memory, original pair 7,429 MiB 7,107 MiB
Last sampled local video memory, repeat pair 7,429 MiB 6,979 MiB

The budget runs logged 329 evictions each, with 3 and 2 remaps. Both settings still reached the commit guard. The first BCPack refusal is a repeatable log marker for comparing the streaming interval after manual menu navigation. At 128 refusals, all four runs reported the same breakdown: 100 BC5, 20 BC7, and 8 BC1. The focused page_budget_evicts_the_least_recently_touched_cpu_filled_texture GPU test also passed.

AI-assisted with Codex for the runs, log analysis, and report.

gustavsi added a commit to gustavsi/xcl that referenced this pull request Nov 24, 2026
…-watch merge

Integrates upstream PRs ivall#594, ivall#640, and ivall#551:
- Order reserved-texture tile unmaps behind known title queues with GPU
  fences before releasing tiles back to pools (ivall#594).
- Add opt-in XCL_PAGE_BUDGET_MB to evict LRU CPU-filled title textures
  when texture page pools hit the cap, remapping and re-uploading on use
  (ivall#640), preventing unbounded VRAM growth during world streaming.
- Merge write-watch scan gaps up to 64 MiB and clip regions with binary
  search to cut GetWriteWatch overhead during streaming (ivall#551).
@requiemsnkrp

Copy link
Copy Markdown
Contributor

Follow-up: on this title the budget leaves visible holes. Sampled-only textures are evicted and never mapped again. This answers the "Not tested" item about evicted textures in a visible place.

Same machine and tree as my report above (RTX 3060 12 GB; main 930e8b4 + this PR 5d6fac8 + #1248, #680, #1316 and others merged locally), two runs back to back, everything else the same (XCL_HEAP_WINDOWS=1 XCL_PSO_WAIT_MS=50):

XCL_PAGE_BUDGET_MB=6144 XCL_PAGE_BUDGET_MB=0
story loading screens (the character artwork) the artwork is missing; only the backdrop silhouettes are drawn complete
budget reached / evictions at 83 s, during those screens; 4,896 textures evicted, 12 mapped again by the end –
end +0x23cf683 at 146.9 s closed by hand at 104.8 s; local 10.7 GB (my system-memory spill), non-local 7.33 GB of a 7.49 GB budget

The reading (inference, from the code): revive_listed and refresh_once map a texture again only when a list transitions it, the CPU writes it, or a copy lands in it. A texture the title only samples, like this artwork, gets none of those while it is on screen, so its touched time stays old. LRU then takes it first and it is never brought back. The title keeps sampling it, from unmapped tiles, as zeros.

That seems to need a use signal for sampled textures before the budget can be on by default. @albertoglvn's "use by T#" experiment above (SRV index → placed texture, reading the T# words in the heap) looks like the right one. A cheaper partial guard might be to skip textures whose SRVs are in the shader-visible heap at all; I have not tried it.

AI use: Claude Code (Claude Opus 5.5) read the logs and the PR's code and wrote this. The runs and what was on screen are mine.

@yeistark

Copy link
Copy Markdown

Test report for #640 on a 12 GB NVIDIA card with 16 GB RAM: the +0x193e00f / E_OUTOFMEMORY stop of #333 is gone with XCL_PAGE_BUDGET_MB=6144.

Tree: cf90938 (local, no uncommitted changes) = main b7aa9f3 + revert of b8b1f49 (#1307) + #1316 (ee904f1, with #1315) + #1288 (9cdae10) + this PR (5d6fac8). All merged cleanly.

Hardware / software

  • NVIDIA RTX A2000 12 GB (11354 MiB VRAM, wave32 only), driver 621.14 (32.0.16.2114)
  • AMD Ryzen 7 5700, 16 GB RAM, page files 32 GB (D:) + 4 GB (C:), commit limit 51.8 GB
  • Windows 11 build 26200, rustc 1.100.0 MSVC, release, DXC 1.9.2609.5
  • Retail title 1.0.2.1, Series X profile, XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_DXC_THREADS=6

Tests: cargo test --workspace -- --test-threads=4 on cf90938: 799 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware, tests_compact::gpu_compact_native_wave64_form.

Without this PR (635eaa3, same tree minus #640, budget unset), from the process's memory: lines:

Local + non-local ≈ 18.3 GB, which fits the "card + half the RAM" ceiling measured in #333 (11.3 + ~8 GB here).

With this PR, XCL_PAGE_BUDGET_MB=6144:

run peak local VRAM peak process commit CreateHeap refusals #101 at ended
1 10905 MB 29.5 GB 0 87.7 s stopped by me at 1120 s, alive
2 (+ XCL_PSO_WAIT_MS=2000) 11097 MB 30.6 GB 0 103.2 s stopped by me at 284 s, alive

Page budget at the end of run 1: 4941 textures evicted, 16 mapped again. No device removal and no crash in either run.

Not tested / caveats

AI use: Claude Code (Claude Opus 5.5) built the tree, ran the tests and the title on this machine, and drafted this report; I checked it before posting.

@rrrarrra9

Copy link
Copy Markdown

Tested

  • Windows, GTX 1650 (4 GB), Series X package. Local release build aa0cd5474f1894e4819657583ebad42e1c20ab22 (b7aa9f3 + DXGI budget logging + a cherry-pick of this PR). XCL_ACTIVITY=1 and XCL_PAGE_BUDGET_MB=2048.
  • The 210 s run recorded 2,296 PresentX calls and no device removal. The last sample had 11,602 MiB of local usage, 6,912 MiB of texture page pools, 5,478 evictions and 57 remaps. A 270 s repeat with the shader cache already populated recorded 2,165 PresentX calls and no device removal, with 11,661 MiB local at the last sample. Both runs still had a black screen and slow presents near the end.
  • The run without this PR (e1c920e, same DXGI logging) sampled 13,876 MiB of local usage against a 3,344 MiB budget before device removal at about 148 s.

Not tested This PR head in isolation, longer gameplay, or the visual effect of eviction once in the world.

AI use OpenAI Codex with GPT-6.2-Sol summarized the local run logs.

@celmix07-design

Copy link
Copy Markdown

A 6 GB / 16 GB data point for this PR: with XCL_PAGE_BUDGET_MB=3072 the world load gets past the video-memory assert, and the run then ends in a device hang instead.

Setup: NVIDIA GeForce RTX 2060 6 GB (wave32), driver 621.01; 16 GB DDR5 (one stick), 44 GB page file; Windows 11 Home 26200; retail 1.0.2.1, Series X profile; release build of main 4178e88 + this PR's head 5d6fac8, DXC 1.9.2602.17.

Without the budget (same build, three runs): sparse windows: no video memory for more tiles and no video memory for more pages of title textures (0x8007000e), then 0x80000003 at +0x193e00f with rax = rcx = rsi = 0x8007000e, 110–195 s in. Per-process GPU counters just before: dedicated 5.2 GB of 6, shared 7.6 GB, which is Windows' shared limit (half the RAM).

With XCL_PAGE_BUDGET_MB=3072: page budget 3072 MB (48 pools of 64 MB), textures evicted from 13 s on (160 by 43 s), no 0x8007000e at all. The game reaches gameplay; at 63 s the device is removed with 0x887a0005 (DXGI_ERROR_DEVICE_HUNG), and the title is stopped. Nothing else is logged before it.

Not tested yet: TdrDelay. A pass slower than Windows' 2 s on this card and a pass that never ends look the same here; I will add the result.

AI use: Claude Code (Claude Opus 5.5) ran the builds and runs and drafted this note; the numbers come from the runs described.

@zorde23

zorde23 commented Nov 25, 2026

Copy link
Copy Markdown

Test report on an AMD RX 6750 XT (12 GB, driver 32.0.21045.29003), Ryzen 7 5700X, 32 GB RAM, Windows build 26200, release build.

What was tested: 5d6fac8 no longer applies to current main (#1747 reworked the tile pool in vram.rs), so I rebased it locally onto 80f4819. This is not your commit, so here is what I changed: the cap check moved from take_tile to the start of Pages::bind, before the missing tiles are counted (an eviction can free pages the texture being bound shares). At the budget it runs one evict_lru round of max(EVICT_BATCH, tiles), then moves every cooling tile into the free lists before take_batch. evict_lru counts pool.free_total + pool.cooling.len(). Both of your page_budget_* tests pass on the rebase (the second one adapted to the new pool). Budget XCL_PAGE_BUDGET_MB=4096. The same build also had local diagnostics (memory by kind, a commit guard), which are also in the main run it is compared with.

Run: the retail title, 300 s, A pressed at 15-35 s to reach the world, XCL_PSO_PRELOAD=0, XCL_ACTIVITY=1. Both runs were stopped by my guard at 10 % of the system's commit limit left, with about the same headroom at the start (22.7 / 23.1 GB).

main 80f4819 with the rebased #640
run length (guard) 150 s 251 s
frames drop to 0-20 per 2 s at 76 s 77 s
page pools at 150 s (pages in use) 10.0 GB (9.8) 6.5 GB (6.4)
local video memory at 150 s (OS budget ~10.2 GB) 14.0 GB 10.2 GB
process commit at 150 s 28.1 GB 23.7 GB
textures evicted / mapped again - 5,532 / 263
  • The budget holds the page pools 3.5 GB lower, but they still pass 4096 MB (6.5 GB from ~131 s on).
  • The frame stall starts at the same time, with video memory under the OS budget in both runs, so the budget does not change it on this title. Presents after 70 s: 441 in 80 s (main), 554 in 180 s (D3D12.X: an optional page budget evicts CPU-filled title textures LRU #640).
  • No device removal and no crash in either run. No visual check was made.

Not tested: your exact commit (only the rebase above), other budgets, #782 on top, NVIDIA, a full cargo test --workspace on this rebase (only the vram:: and title_textures:: tests; three of them also fail on main + my local commits on this GPU).

Written with Claude Code from runs on this machine.

@iggyvilla

Copy link
Copy Markdown
Contributor

Test report for #640 (head 5d6fac8, still the PR head on 2026-11-25) on RDNA2, a retail title.

Measured by an agent (omp, DeepSeek V4.1 Flash); I (Claude Code, Claude Sonnet 5.5) re-read the run logs, checked
the numbers below against them and wrote this. Measurement only, no code change; the test suite was not run.

  • Hardware: Radeon RX 6650 XT 8 GB (RDNA2), Ryzen 7 5700X, 32 GB RAM, Windows 10.0.26300, release build,
    retail title 7952987A (not included here).
  • Tree: origin/main b7aa9f3 + D3D12.X: compute pipelines are built ahead of their first bind #889 (e1d3b9d) + kernelx: Sleep does not count the time a bind waits for a pipeline build #1288 (95299f4) + this PR. A 300 s scripted walk (XCL_PRESS_AT gamepad presses) from a save past first-run setup, XCL_ACTIVITY=1 XCL_DXC_THREADS=4 XCL_NETWORK=0.
  • Budget 4096: page budget 4096 MB (64 pools of 64 MB) logged at 2.6 s, 5,743
    textures evicted and 79 mapped again. Peak pages 6,589 MB (pools 6,592) and peak local 11,729 MB,
    against 9,817 / 14,956 MB with the budget unset (the control run, same tree). The pools stay ~2.5 GB over the cap,
    the soft-cap behaviour the PR describes. Both walks reached the loading art; neither drew the world.
  • No new failure signature: no device removal, no 0x8007000e, no +0x23cf683. But the last present is at
    145 s in both, so missing or zero-sampled textures cannot be judged from these runs.
  • Process commit: the budget run climbed at ~1 GB/s from ~205 s to 71 GB and Windows ended the process at
    254 s (74.5 GB, event 2004). This is not shown to come from the PR: the base tree without the PR did
    the same from ~280 s (34 GB -> 71 GB at 308 s), and XCL's own page/pool counters are
    flat during the climb. The two other budget runs (3072 and a repeat of 4096) hit 71 GB at 62 s while still in the
    menus, but they ran minutes after an OS kill with only 25.8 GB free, and the script aborted at 64-66 s, so
    they are invalid and only a note: pages were 4.2 and 4.1 GB there.
  • One run per state; the climb is an observation, not a measured cause.

Not tested

AI use: an agent (omp, DeepSeek V4.1 Flash) ran and measured; Claude Code, Claude Sonnet 5.5 verified and wrote this report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.