D3D12.X: a title allocator takes a free spare another one put aside #2715

Closed
veyn-sudo wants to merge 1 commit from upstream-pr/2725 into main
veyn-sudo commented 2026-11-26 08:58:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by veyn-sudo on 2026-11-26T08:58:12Z.


When the title resets a command allocator while lists still hold recordings on its PC allocator, alloc_pool puts that one aside and goes on with another: one this title allocator put aside earlier that is free again, or a new one. A title that resets many allocators so makes a PC allocator for almost every one of them and keeps it, although others lie free. This lets a title allocator take a free spare of the same list type that another one put aside.

Part of #2688 (workstream 6: memory that grows in the world). Related: #2138 drops free spares beyond two per title allocator, and #2707 resets idle ones so their memory comes back. Both deal with spares already made; this makes fewer of them. #2707 also changes title_reset_in, so whichever merges second needs a rebase.

What is in it

  • crates/xcl/src/hle/d3d12x/alloc_pool.rs: title_reset_in looks for a free spare of the same type among the other title allocators' when it has none of its own, and takes it over (it then goes with this title allocator's forget). Never another title allocator's own allocator: that one goes with the title's Release. Test: a_free_spare_another_title_allocator_put_aside_is_taken (also: not one in use, not one of another type).

Tested

  • RTX 2070 SUPER (driver 617.14), i7-9700K, 32 GB, Windows 11 26300, Rust 1.99.0, debug for the tests, release for the title.
  • cargo test --workspace --no-fail-fast -- --test-threads=4 on ad9172c0: 1436 passed, 0 failed, 47 ignored; 25 SKIPPED lines (21 no wave64, 3 f16 forms refused, 1 no heap windows).
  • A retail title's world on a local tree (main + #1453 + other open PRs, XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1), with a temporary count of the spares: before, at 162 s, 315 title allocators had 327 PC allocators made, 287 of them free, and the process's non-local video memory grew 1.3 → 3.0 GB in 40 s. With this, 282 made at 191 s (flat after 160 s), non-local memory flat at about 2.6 GB from 160 s on, and the run went from 169 s to 194 s before the memory guard stopped it.

Regression run

main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 2070 SUPER
title: 404998dc
seconds: 60
exit: 0x0
frames shown: 1556 (PresentX 1556)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14673 MB

this PR:

xcl-smoke v1
commit: ad9172c015a8b33aa90ca002704ea4d3db212b40
gpu: NVIDIA GeForce RTX 2070 SUPER
title: 404998dc
seconds: 60
exit: 0x0
frames shown: 1585 (PresentX 1585)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14372 MB

Not tested

  • AMD and Intel; the title without #1453 (without it, more spares stay held by retired split segments and fewer are free to share).

AI use

  • Claude Code with Claude Opus 5.5 wrote the code and the test, ran everything on my PC and wrote this description.

🤖 Generated with Claude Code

https://claude.ai/code/session_01WStEFektfHt5AEbK6Wupac

<!-- greyfinch-sync:ivall/xcl:issue:5506981014 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2725). Originally posted by [veyn-sudo](https://github.com/veyn-sudo) on 2026-11-26T08:58:12Z. --- When the title resets a command allocator while lists still hold recordings on its PC allocator, `alloc_pool` puts that one aside and goes on with another: one this title allocator put aside earlier that is free again, or a new one. A title that resets many allocators so makes a PC allocator for almost every one of them and keeps it, although others lie free. This lets a title allocator take a free spare of the same list type that another one put aside. Part of #2688 (workstream 6: memory that grows in the world). Related: #2138 drops free spares beyond two per title allocator, and #2707 resets idle ones so their memory comes back. Both deal with spares already made; this makes fewer of them. #2707 also changes `title_reset_in`, so whichever merges second needs a rebase. **What is in it** - `crates/xcl/src/hle/d3d12x/alloc_pool.rs`: `title_reset_in` looks for a free spare of the same type among the other title allocators' when it has none of its own, and takes it over (it then goes with this title allocator's `forget`). Never another title allocator's own allocator: that one goes with the title's Release. Test: `a_free_spare_another_title_allocator_put_aside_is_taken` (also: not one in use, not one of another type). **Tested** - RTX 2070 SUPER (driver 617.14), i7-9700K, 32 GB, Windows 11 26300, Rust 1.99.0, debug for the tests, release for the title. - `cargo test --workspace --no-fail-fast -- --test-threads=4` on `ad9172c0`: 1436 passed, 0 failed, 47 ignored; 25 `SKIPPED` lines (21 no wave64, 3 f16 forms refused, 1 no heap windows). - A retail title's world on a local tree (`main` + #1453 + other open PRs, `XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1`), with a temporary count of the spares: before, at 162 s, 315 title allocators had 327 PC allocators made, 287 of them free, and the process's non-local video memory grew 1.3 → 3.0 GB in 40 s. With this, 282 made at 191 s (flat after 160 s), non-local memory flat at about 2.6 GB from 160 s on, and the run went from 169 s to 194 s before the memory guard stopped it. **Regression run** main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 2070 SUPER title: 404998dc seconds: 60 exit: 0x0 frames shown: 1556 (PresentX 1556) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14673 MB ``` this PR: ``` xcl-smoke v1 commit: ad9172c015a8b33aa90ca002704ea4d3db212b40 gpu: NVIDIA GeForce RTX 2070 SUPER title: 404998dc seconds: 60 exit: 0x0 frames shown: 1585 (PresentX 1585) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14372 MB ``` **Not tested** - AMD and Intel; the title without #1453 (without it, more spares stay held by retired split segments and fewer are free to share). **AI use** - Claude Code with Claude Opus 5.5 wrote the code and the test, ran everything on my PC and wrote this description. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01WStEFektfHt5AEbK6Wupac
Decodere commented 2026-11-26 10:06:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T09:28:43Z.


Independent RTX 4060 (8 GB) / Windows 11 verification of PR #2725 at ad9172c015a8b33aa90ca002704ea4d3db212b40 (exact parent origin/main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Measurements and targeted test results only; not a full source review.

Setup

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200
  • Toolchain / caches: rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs)
  • Workload: Retail workload title: 29640639 via scripts/smoke.ps1 -Seconds 60 (XCL_NETWORK=0 XCL_ACTIVITY=1, default flags, no input)

Targeted RTX 4060 release unit tests (ad9172c0)

  • cargo test --release -p xcl --lib hle::d3d12x::alloc_pool::tests::a_free_spare_another_title_allocator_put_aside_is_taken -- --nocapture: 1 passed, 0 failed, 0 ignored (0.00 s, exit 0).
  • cargo test --release -p xcl --lib hle::d3d12x::alloc_pool:: -- --test-threads=4: 5 passed, 0 failed, 0 ignored (0.22 s, 0 skipped, exit 0).
  • cargo test --release -p xcl --lib hle::d3d12x::list_x:: -- --test-threads=4: 40 passed, 0 failed, 0 ignored (0.70 s, 0 skipped, exit 0).

Observations

  • Cross-allocator spare reuse in title_reset_in passes the new regression test (a_free_spare_another_title_allocator_put_aside_is_taken) and all 45 targeted alloc_pool:: + list_x:: tests cleanly in --release on this RTX 4060 host.
  • Quiet 60 s retail smoke (XCL_ACTIVITY=1) ran cleanly (exit: 0x0, 1582 frames shown, 60 60 60 steady-state presents per 2 s, 0 device removals, 0 crashes, 14008 MB peak commit vs parent b49be183's 14018 MB / 1518 frames; steady-state VRAM 6116 MB local / 4685 MB non-local at 58.2 s).
  • During this 60 s no-input menu/intro window, the title logged 4 reset-while-busy swaps (14.9..18.8 s, ending at 4 made, 4 put aside now and 214 blocks held for 214 allocators), with no allocator errors or stalls.

Paired 60 s RTX 4060 smoke (b49be183 vs ad9172c0)

Parent origin/main (b49be183):

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

PR #2725 head (ad9172c0):

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

Limits of coverage

  • Full workspace test suite was not re-run on ad9172c0 (only targeted alloc_pool:: and list_x:: release tests plus paired quiet 60 s smoke).
  • The quiet 60 s no-input menu/intro smoke only triggered 4 reset-while-busy allocator swaps (4 made, 4 put aside), so it verifies zero runtime regression rather than long-session world-load non-local VRAM reduction under high allocator churn (cross-allocator spare reuse itself is exercised by a_free_spare_another_title_allocator_put_aside_is_taken).
  • Single discrete NVIDIA 8 GB GPU (RTX 4060) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host.

AI use

Ran the targeted release unit tests and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts, log figures, and smoke blocks were taken directly from cargo test, xcl.log, and scripts/smoke.ps1 outputs.

<!-- greyfinch-sync:ivall/xcl:comment:7188044005 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2725#issuecomment-7188044005). Originally posted by [Decodere](https://github.com/Decodere) on 2026-11-26T09:28:43Z. --- **Independent RTX 4060 (8 GB) / Windows 11 verification of PR #2725 at `ad9172c015a8b33aa90ca002704ea4d3db212b40`** (exact parent `origin/main` `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`). Measurements and targeted test results only; not a full source review. ### Setup - **GPU:** NVIDIA GeForce RTX 4060 (8 GB / `7956 MiB` reported by D3D12), driver `32.0.16.2114` (NVIDIA `621.14`, WDDM 3.2) - **CPU / RAM / OS:** Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (`31.9 GiB` usable), Windows 11 Home `26200` - **Toolchain / caches:** `rustc 1.100.0 (0ef1bc386 2026-11-09)`, DXC `1.9.2609.5`, release builds, warm DXIL/pipeline caches, quiet machine (zero concurrent builds/tests during timed runs) - **Workload:** Retail workload `title: 29640639` via `scripts/smoke.ps1 -Seconds 60` (`XCL_NETWORK=0 XCL_ACTIVITY=1`, default flags, no input) ### Targeted RTX 4060 release unit tests (`ad9172c0`) - `cargo test --release -p xcl --lib hle::d3d12x::alloc_pool::tests::a_free_spare_another_title_allocator_put_aside_is_taken -- --nocapture`: **1 passed, 0 failed, 0 ignored** (`0.00 s`, exit `0`). - `cargo test --release -p xcl --lib hle::d3d12x::alloc_pool:: -- --test-threads=4`: **5 passed, 0 failed, 0 ignored** (`0.22 s`, `0` skipped, exit `0`). - `cargo test --release -p xcl --lib hle::d3d12x::list_x:: -- --test-threads=4`: **40 passed, 0 failed, 0 ignored** (`0.70 s`, `0` skipped, exit `0`). ### Observations - Cross-allocator spare reuse in `title_reset_in` passes the new regression test (`a_free_spare_another_title_allocator_put_aside_is_taken`) and all 45 targeted `alloc_pool::` + `list_x::` tests cleanly in `--release` on this RTX 4060 host. - Quiet 60 s retail smoke (`XCL_ACTIVITY=1`) ran cleanly (`exit: 0x0`, `1582` frames shown, `60 60 60` steady-state presents per 2 s, `0` device removals, `0` crashes, `14008 MB` peak commit vs parent `b49be183`'s `14018 MB` / `1518` frames; steady-state VRAM `6116 MB` local / `4685 MB` non-local at `58.2 s`). - During this 60 s no-input menu/intro window, the title logged `4` reset-while-busy swaps (`14.9..18.8 s`, ending at `4 made, 4 put aside now` and `214 blocks held for 214 allocators`), with no allocator errors or stalls. ### Paired 60 s RTX 4060 smoke (`b49be183` vs `ad9172c0`) Parent `origin/main` (`b49be183`): ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1518 (PresentX 1518) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14018 MB ``` PR #2725 head (`ad9172c0`): ``` xcl-smoke v1 commit: ad9172c015a8b33aa90ca002704ea4d3db212b40 gpu: NVIDIA GeForce RTX 4060 title: 29640639 seconds: 60 exit: 0x0 frames shown: 1582 (PresentX 1582) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14008 MB ``` ### Limits of coverage - Full workspace test suite was not re-run on `ad9172c0` (only targeted `alloc_pool::` and `list_x::` release tests plus paired quiet 60 s smoke). - The quiet 60 s no-input menu/intro smoke only triggered `4` reset-while-busy allocator swaps (`4 made, 4 put aside`), so it verifies zero runtime regression rather than long-session world-load non-local VRAM reduction under high allocator churn (cross-allocator spare reuse itself is exercised by `a_free_spare_another_title_allocator_put_aside_is_taken`). - Single discrete NVIDIA 8 GB GPU (`RTX 4060`) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host. ### AI use Ran the targeted release unit tests and paired quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts, log figures, and smoke blocks were taken directly from `cargo test`, `xcl.log`, and `scripts/smoke.ps1` outputs.
emirduran707 commented 2026-11-26 10:06:24 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by emirduran707 on 2026-11-26T09:47:13Z.


Independent AMD RDNA4 (native wave64) verification of exact PR head ad9172c015a8b33aa90ca002704ea4d3db212b40 on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver 32.0.31044.16, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC 1.9.2602.17).

Tested

  • cargo build --workspace (debug): passed (0 errors).
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 1434 passed, 2 failed, 47 ignored (8 SKIPPED: 6 per-lane DXIL forms refused by host adapter/driver, 1 heap_window_out_of_memory_falls_back_to_the_switch_form no heap windows, 1 pso_measurement_compiles_an_exact_synthetic_record Windows Developer Mode off).
    • The new test hle::d3d12x::alloc_pool::tests::a_free_spare_another_title_allocator_put_aside_is_taken passed.
    • The 2 failures (gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 and fuzz_validate_and_gpu_3) are pre-existing on unmodified main on this RX 9060 XT / driver 32.0.31044.16.
  • cargo build --release -p xcl + 60 s retail-title smoke test (scripts/smoke.ps1, offline):
xcl-smoke v1
commit: ad9172c015a8b33aa90ca002704ea4d3db212b40
gpu: AMD Radeon RX 9060 XT
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1617 (PresentX 1617)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 18716 MB

(Compare against main b49be183 on this machine: 1603 frames, 18576 MB peak, 0 device removals, 0 crashes.)

Not tested

  • NVIDIA / Intel GPUs, Linux / Wine.

AI use

  • Verification run and report prepared with Antigravity (Gemini 4 Neon); all build, test, and smoke results are from live runs on this machine.
<!-- greyfinch-sync:ivall/xcl:comment:7188468904 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2725#issuecomment-7188468904). Originally posted by [emirduran707](https://github.com/emirduran707) on 2026-11-26T09:47:13Z. --- Independent AMD RDNA4 (native wave64) verification of exact PR head `ad9172c015a8b33aa90ca002704ea4d3db212b40` on Windows 11 Pro 26300 (AMD Radeon RX 9060 XT 16 GB, driver `32.0.31044.16`, Ryzen 5 5600, Rust 1.100.0 MSVC, DXC `1.9.2602.17`). **Tested** - `cargo build --workspace` (debug): passed (`0` errors). - `cargo test --workspace --no-fail-fast -- --test-threads=4`: `1434 passed, 2 failed, 47 ignored` (`8 SKIPPED`: 6 per-lane DXIL forms refused by host adapter/driver, 1 `heap_window_out_of_memory_falls_back_to_the_switch_form` no heap windows, 1 `pso_measurement_compiles_an_exact_synthetic_record` Windows Developer Mode off). - The new test `hle::d3d12x::alloc_pool::tests::a_free_spare_another_title_allocator_put_aside_is_taken` passed. - The 2 failures (`gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1` and `fuzz_validate_and_gpu_3`) are pre-existing on unmodified `main` on this RX 9060 XT / driver `32.0.31044.16`. - `cargo build --release -p xcl` + 60 s retail-title smoke test (`scripts/smoke.ps1`, offline): ``` xcl-smoke v1 commit: ad9172c015a8b33aa90ca002704ea4d3db212b40 gpu: AMD Radeon RX 9060 XT title: 21222967 seconds: 60 exit: 0x0 frames shown: 1617 (PresentX 1617) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 18716 MB ``` (Compare against `main` `b49be183` on this machine: `1603 frames, 18576 MB peak, 0 device removals, 0 crashes`.) **Not tested** - NVIDIA / Intel GPUs, Linux / Wine. **AI use** - Verification run and report prepared with Antigravity (Gemini 4 Neon); all build, test, and smoke results are from live runs on this machine.
jennydeth commented 2026-11-26 16:06:16 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jennydeth on 2026-11-26T15:25:16Z.


Windows / NVIDIA results for ad9172c with the retail title (1.0.2.1) on an RTX 3060 12 GB.

Regression run (default settings, 600 s)

main b49be18:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3060
title: 9cc6a39e
seconds: 600
exit: 0x0
frames shown: 2047 (PresentX 2047)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 35859 MB

This PR, ad9172c:

xcl-smoke v1
commit: ad9172c015a8b33aa90ca002704ea4d3db212b40
gpu: NVIDIA GeForce RTX 3060
title: 9cc6a39e
seconds: 600
exit: 0x0
frames shown: 1951 (PresentX 1951)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 35596 MB
  • This PR has 1,951 frames against main's 2,047 (95 %) and peak commit of 35,596 MB against 35,859 MB (99 %), with no removal and no crash in either. Neither run reaches the world: presents stop at 100.3 s on main and at 96.0 s with this PR, while big compute programs are still compiling.
  • Allocator counter (allocator resets so far with recordings still held or on the GPU – another PC allocator took its place (N made, …)): at 32 resets, 23 made with this PR against 20 on main in the 600 s pair. In the direct DXIL runs, 64 made at 64 resets with this PR against 31 at 32 on main today. So in these runs nearly every reset made a new PC allocator, and I can't see the spares of other allocators being taken. One run each, and the line only says how many were made, not where a reused one came from.
  • Direct DXIL (XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1, warm caches, 900 s): the device was lost (0x887a0005, #2403) at 114.2 s, last present at 110.3 s, with the same DRED line as on main (page fault at GPU VA 0x0; allocations there: []; recently freed: []). Three b49be18 runs today with the same switches lost it at 110.6, 211.2 and 216.0 s, so one run can't tell this PR apart from main there.

Tested

  • NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.2101 (32-lane waves only); Ryzen 5 5600X; 32 GB RAM; Windows 11 Pro 10.0.26300.9974; Rust 1.100.0 (stable-x86_64-pc-windows-msvc); release; DXC 1.9.2609.5.
  • cargo test --workspace --release --no-fail-fast -- --test-threads=4 on ad9172c: 1436 passed, 0 failed, 47 ignored. SKIPPED (29): 21 × no wave64; 3 × per-lane form refused; 3 × no D3D12 debug layer / d3d12SDKLayers.dll; 1 × no heap windows; 1 × pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache).
  • Retail title 1.0.2.1, scripts/smoke.ps1 -Game <folder> (XCL_NETWORK=0), the same scripted pad presses into the story load in every run; XCL_FRAME_DUMP=300 in the pair, 100 in the direct DXIL runs. Every run was of a copy named xcl-noprofile.exe: this machine has #2590's 1 GiB shader-heap profile on xcl.exe, and a copy under another name does not match it.

Not tested: how often a spare comes from another title allocator (no log line for it); AMD / wave64.

AI use: Claude Code (Claude Opus 5.5) built the commit, ran the suite and the runs on my machine, read the logs and wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7196241859 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2725#issuecomment-7196241859). Originally posted by [jennydeth](https://github.com/jennydeth) on 2026-11-26T15:25:16Z. --- Windows / NVIDIA results for `ad9172c` with the retail title (1.0.2.1) on an RTX 3060 12 GB. **Regression run** (default settings, 600 s) `main` `b49be18`: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3060 title: 9cc6a39e seconds: 600 exit: 0x0 frames shown: 2047 (PresentX 2047) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 35859 MB ``` This PR, `ad9172c`: ``` xcl-smoke v1 commit: ad9172c015a8b33aa90ca002704ea4d3db212b40 gpu: NVIDIA GeForce RTX 3060 title: 9cc6a39e seconds: 600 exit: 0x0 frames shown: 1951 (PresentX 1951) presents per 2 s (last 3): 0 0 0 device removals: 0 crashes: 0 peak commit: 35596 MB ``` - This PR has 1,951 frames against `main`'s 2,047 (95 %) and peak commit of 35,596 MB against 35,859 MB (99 %), with no removal and no crash in either. Neither run reaches the world: presents stop at 100.3 s on `main` and at 96.0 s with this PR, while big compute programs are still compiling. - **Allocator counter** (`allocator resets so far with recordings still held or on the GPU – another PC allocator took its place (N made, …)`): at 32 resets, 23 made with this PR against 20 on `main` in the 600 s pair. In the direct DXIL runs, 64 made at 64 resets with this PR against 31 at 32 on `main` today. So in these runs nearly every reset made a new PC allocator, and I can't see the spares of other allocators being taken. One run each, and the line only says how many were made, not where a reused one came from. - **Direct DXIL** (`XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_DRED=1`, warm caches, 900 s): the device was lost (`0x887a0005`, #2403) at 114.2 s, last present at 110.3 s, with the same DRED line as on `main` (`page fault at GPU VA 0x0; allocations there: []; recently freed: []`). Three `b49be18` runs today with the same switches lost it at 110.6, 211.2 and 216.0 s, so one run can't tell this PR apart from `main` there. **Tested** - NVIDIA GeForce RTX 3060 12 GB, driver 32.0.16.2101 (32-lane waves only); Ryzen 5 5600X; 32 GB RAM; Windows 11 Pro 10.0.26300.9974; Rust 1.100.0 (`stable-x86_64-pc-windows-msvc`); release; DXC 1.9.2609.5. - `cargo test --workspace --release --no-fail-fast -- --test-threads=4` on `ad9172c`: **1436 passed, 0 failed, 47 ignored**. SKIPPED (29): 21 × no wave64; 3 × per-lane form refused; 3 × no D3D12 debug layer / `d3d12SDKLayers.dll`; 1 × no heap windows; 1 × `pso_measurement_compiles_an_exact_synthetic_record` (cannot disable the driver cache). - Retail title 1.0.2.1, `scripts/smoke.ps1 -Game <folder>` (`XCL_NETWORK=0`), the same scripted pad presses into the story load in every run; `XCL_FRAME_DUMP=300` in the pair, `100` in the direct DXIL runs. Every run was of a copy named `xcl-noprofile.exe`: this machine has #2590's 1 GiB shader-heap profile on `xcl.exe`, and a copy under another name does not match it. **Not tested:** how often a spare comes from another title allocator (no log line for it); AMD / wave64. AI use: Claude Code (Claude Opus 5.5) built the commit, ran the suite and the runs on my machine, read the logs and wrote this.
throny commented 2026-11-26 16:06:19 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-11-26T15:49:17Z.


Test report: in the world on an RTX 4080 16 GB. No harm; no measurable change on this card.

Tested

  • RTX 4080 16 GB (driver 621.40), i9-12900K, 64 GB RAM, Windows 11 26300, release. This PR's diff at its head (git apply, as it is) on nvidia-dev af2cecc4 + #684 + #2697 + #2749 + #2729 + #2794 + #2817 (stack) + #2768 + #2782. The retail title of #505, Series X profile, into the world.
  • With it, 2 runs (34 s and 332 s of world); without it, 3 runs of the same tree less #2768 / #2782 (110, 126 and 226 s of world).
at the end of the run without (3 runs) with (2 runs)
blocks held / allocators 107 / 61, 120 / 56, 161 / 66 107 / 52, 130 / 60
non-local video memory 5,469–5,625 MB 5,582–5,593 MB
committed 39.9–40.4 GB 38.6–40.7 GB
  • So in these windows the blocks held and the non-local memory are the same with and without; the growth the PR is about did not show up on this card within 5 minutes of world (its non-local share is steady at about 5.5 GB, 4.1 GB of it the UMA window), so this is a "does no harm" report, not a confirmation of the saving.
  • The longer run ended with the device removal this card has in about half of its world runs on this branch (see #2688); the short one was ended by my own guard.

Not tested

  • A run long enough, or on a card with less RAM, to show the growth; the suite; AMD.

AI use: Claude Code (Claude Fable 5.2) ran this on the owner's machine and wrote the report.

<!-- greyfinch-sync:ivall/xcl:comment:7196796178 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2725#issuecomment-7196796178). Originally posted by [throny](https://github.com/throny) on 2026-11-26T15:49:17Z. --- **Test report: in the world on an RTX 4080 16 GB. No harm; no measurable change on this card.** **Tested** - RTX 4080 16 GB (driver 621.40), i9-12900K, 64 GB RAM, Windows 11 26300, release. This PR's diff at its head (`git apply`, as it is) on `nvidia-dev` `af2cecc4` + #684 + #2697 + #2749 + #2729 + #2794 + #2817 (stack) + #2768 + #2782. The retail title of #505, Series X profile, into the world. - With it, 2 runs (34 s and 332 s of world); without it, 3 runs of the same tree less #2768 / #2782 (110, 126 and 226 s of world). | at the end of the run | without (3 runs) | with (2 runs) | |---|---|---| | blocks held / allocators | 107 / 61, 120 / 56, 161 / 66 | 107 / 52, 130 / 60 | | non-local video memory | 5,469–5,625 MB | 5,582–5,593 MB | | committed | 39.9–40.4 GB | 38.6–40.7 GB | - So in these windows the blocks held and the non-local memory are the same with and without; the growth the PR is about did not show up on this card within 5 minutes of world (its non-local share is steady at about 5.5 GB, 4.1 GB of it the UMA window), so this is a "does no harm" report, not a confirmation of the saving. - The longer run ended with the device removal this card has in about half of its world runs on this branch (see #2688); the short one was ended by my own guard. **Not tested** - A run long enough, or on a card with less RAM, to show the growth; the suite; AMD. AI use: Claude Code (Claude Fable 5.2) ran this on the owner's machine and wrote the report.
veyn-sudo commented 2026-11-26 16:06:21 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by veyn-sudo on 2026-11-26T15:54:50Z.


@jennydeth @throny thank you both. Your two reports agree, and they point at a gap in how I measured this.

The saving in the description (327 → 282 PC allocators made, non-local memory flat from 160 s) was measured on our local tree, which also has #1453. As the description says under Not tested, without #1453 the retired split segments keep their spares, so few of them are free for another title allocator to take. That fits what you both saw on main / nvidia-dev: about one new PC allocator per reset, and no change in blocks held or non-local memory.

The PR's log line also can't show whether a spare came from another allocator, so a run can't tell a take-over from a fresh allocator. I'm setting the PR back to draft until I have:

  • a count of the spares taken over from another title allocator, in the existing line;
  • a measurement on clean main with and without #1453 underneath, so the effect and its dependency are both shown.

If it turns out to matter only with #1453, I'll stack it on #1453 and say so at the top.

AI use: Claude Code (Claude Opus 5.5) wrote this.

<!-- greyfinch-sync:ivall/xcl:comment:7196921102 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2725#issuecomment-7196921102). Originally posted by [veyn-sudo](https://github.com/veyn-sudo) on 2026-11-26T15:54:50Z. --- @jennydeth @throny thank you both. Your two reports agree, and they point at a gap in how I measured this. The saving in the description (327 → 282 PC allocators made, non-local memory flat from 160 s) was measured on our local tree, which also has #1453. As the description says under **Not tested**, without #1453 the retired split segments keep their spares, so few of them are free for another title allocator to take. That fits what you both saw on `main` / `nvidia-dev`: about one new PC allocator per reset, and no change in blocks held or non-local memory. The PR's log line also can't show whether a spare came from another allocator, so a run can't tell a take-over from a fresh allocator. I'm setting the PR back to draft until I have: - a count of the spares taken over from another title allocator, in the existing line; - a measurement on clean `main` with and without #1453 underneath, so the effect and its dependency are both shown. If it turns out to matter only with #1453, I'll stack it on #1453 and say so at the top. AI use: Claude Code (Claude Opus 5.5) wrote this.
github-actions[bot] commented 2026-12-01 02:34:53 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:34:53Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7298769277 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2725#issuecomment-7298769277). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-12-01T02:34:53Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
Foniass commented 2026-12-01 08:49:21 +00:00 (Migrated from github.com)

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


Triage (#1607) – head ad9172c

Main commit 8e7b566 makes this change and says it is adapted from this PR. shared_aside_probes / take_shared_aside in alloc_pool.rs take a free spare of the same type from another title allocator's aside list, never the owner's own allocator. Its test is the same as this PR's. The main version also checks fences outside STATE and skips donors with a reset in progress. alloc_pool.rs has since been reworked, so this branch conflicts.
Recommendation: close (superseded by main commit 8e7b566).

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:7305830225 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2725#issuecomment-7305830225). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:49:21Z. --- **Triage (#1607)** – head ad9172c Main commit 8e7b566 makes this change and says it is adapted from this PR. `shared_aside_probes` / `take_shared_aside` in `alloc_pool.rs` take a free spare of the same type from another title allocator's aside list, never the owner's own allocator. Its test is the same as this PR's. The main version also checks fences outside STATE and skips donors with a reset in progress. alloc_pool.rs has since been reworked, so this branch conflicts. Recommendation: close (superseded by main commit 8e7b566). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
throny commented 2026-12-01 12:59:12 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:59:12Z.


Closing as superseded: this change is already on main (8e7b566). 8e7b566 'Adapted from PR #2725': alloc_pool takes a free same-type spare from another allocator's aside list, never a title allocator itself or a busy/other-type one; test a_free_spare_from_another_allocator_is_transferred_safely

Two independent checks found this: Foniass's close list on #1607 and ours against current main. If something here is still missing on main, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

<!-- greyfinch-sync:ivall/xcl:comment:7311935608 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2725#issuecomment-7311935608). Originally posted by [throny](https://github.com/throny) on 2026-12-01T12:59:12Z. --- Closing as superseded: this change is already on `main` (8e7b566). 8e7b566 'Adapted from PR #2725': alloc_pool takes a free same-type spare from another allocator's aside list, never a title allocator itself or a busy/other-type one; test a_free_spare_from_another_allocator_is_transferred_safely Two independent checks found this: Foniass's close list on #1607 and ours against current `main`. If something here is still missing on `main`, say so and reopen it, or ask and I will. AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

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