Skip to content

D3D12.X: detach retired segments and reclaim idle aside allocators - #2707

Open
Saksukella wants to merge 6 commits into
xcl-dev:mainfrom
Saksukella:fix/alloc-pool-retire-reclaim
Open

Saksukella wants to merge 6 commits into
xcl-dev:mainfrom
Saksukella:fix/alloc-pool-retire-reclaim

Conversation

@Saksukella

@Saksukella Saksukella commented Nov 26, 2026 •

Copy link
Copy Markdown

What is in it

  • crates/xcl/src/hle/d3d12x/alloc_pool.rs:
    • Add retire_recording(list) to detach a retired split segment or superseded primary list from its old Backing.users while preserving Backing.marks and last_submit (so GPU completion fences and in_flight(list) remain fully enforced).
    • Track Backing.already_reset and reclaim idle free() put-aside backings on title_reset so their held UMA arena blocks and scratch buffers return promptly instead of remaining pinned until a future busy swap on that exact title allocator.
    • Release STATE before calling reset_pc_allocator / CreateCommandAllocator so COM callbacks during allocator reset or resource teardown (such as dropping a pooled prelude ID3D12CommandAllocator -> real::alloc_release -> alloc_pool::forget) cannot self-deadlock on STATE, and release pending UMA blocks per free backing on forget.
    • Guard against concurrent title_reset / reset_list races while STATE is unlocked: track Backing.resetting (Backing::free() requires !self.resetting) with a Condvar (RESET_DONE), reserve the backing in reset_list before invoking native Reset (rolling back on hr < 0), and wait cleanly if a backing is mid-reset.
    • Add unit tests retired_segment_releases_backing_after_gpu_completes_while_preserving_in_flight, clean_title_reset_reclaims_idle_aside_backings_once, stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets, reset_list_blocks_concurrent_title_reset_and_rolls_back_on_failure, and reset_list_waits_while_backing_is_resetting.
  • crates/xcl/src/hle/d3d12x/bind.rs & crates/xcl/src/hle/d3d12x/real.rs:
    • Key bind::State.allocator (and therefore console_list::PENDING UMA blocks) by the native PC allocator backing (alloc_pool::recording_backing / alloc_pool::current) rather than the logical title allocator, and move console_list::allocator_reset(raw) into real::reset_pc_allocator(raw) so swapping away from an in-flight primary backing never frees its UMA blocks while the GPU can still read them.
  • crates/xcl/src/hle/d3d12x/title_list.rs & crates/xcl/src/hle/d3d12x/list_x.rs:
    • Call alloc_pool::retire_recording when title_list::reset moves old split/stand-in segments into spares (and for primary when replaced by a stand_in, retiring its UMA blocks via bind::reset(primary, 0, 0)), in put_spare, and for KickoffX-reclaimed segments in list_x.rs after alloc_pool::executed marks them.

Tested

  • Hardware: AMD Radeon RX 9070 XT (driver 32.0.32029.2010), 24-thread x86_64 CPU, 32 GB RAM, Windows; rustc 1.100.0 (0ef1bc386 2026-11-09); debug (tests) and release (xcl.exe).
  • cargo test -p xcl --lib hle::d3d12x::alloc_pool::tests -- --test-threads=1: 9 passed, 0 failed (0.11s, including stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets, reset_list_blocks_concurrent_title_reset_and_rolls_back_on_failure, and reset_list_waits_while_backing_is_resetting).
  • cargo test -p xcl --lib hle::d3d12x::bind::tests -- --test-threads=1: 8 passed, 0 failed (0.38s).
  • cargo test -p xcl --lib hle::d3d12x::title_list::tests -- --test-threads=1: 3 passed, 0 failed (0.01s).
  • Also live-tested in 180s 3D workload on amd-dev (b5c0275f): previously coherent UMA exhausted 4095/4095 MB (547 blocks held for 236 allocators at 63.7k draws / 34.6k dispatches), triggering unified memory is full and 0x887a0006; with this fix held blocks dropped by >72% (152 blocks / 75 allocators, 4046/4095 MB at 65.5k draws / 47.0k dispatches) with 0 unified memory is full warnings.

Regression run

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: AMD Radeon RX 9070 XT
title: b8db18c2
seconds: 60
exit: 0x0
frames shown: 1624 (PresentX 1624)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 19700 MB
xcl-smoke v1
commit: 1a3b698195d70f8c7d36fdd87678e2ed4df7bc00
gpu: AMD Radeon RX 9070 XT
title: b8db18c2
seconds: 60
exit: 0x0
frames shown: 1669 (PresentX 1670)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 16379 MB

Not tested

AI use

  • Antigravity (Google Gemini): assisted with analyzing the coherent UMA allocator-block leak, keying pending UMA blocks by native allocator backing, adding the resetting/Condvar concurrency guard, writing unit tests, and running local tests and smoke verification. All diffs and measurements were reviewed and verified locally on hardware.

@fromthemoonx

fromthemoonx commented Nov 26, 2026 •

Copy link
Copy Markdown

Rerun on the new head 1a3b698 (the two lifetime fixes from thehollowedone's review): passes on NVIDIA, and each of the 3 new alloc_pool tests fails when the fix it guards is put back.

result
cargo test --workspace --no-fail-fast -- --test-threads=4, 1a3b698 (its base is current main b49be18, so this is also the merged tree) 1443 passed, 0 failed, 47 ignored; 25 SKIPPED lines
reset_list_preserves_previous_backing_until_native_success, forget_does_not_release_a_busy_original_backing_twice_and_reclaims_when_idle, forget_racing_mid_reset_list_cleans_up_on_rollback_and_commit, alone, 40 runs each 40 of 40 each
hle::d3d12x::alloc_pool:: (12 tests), --test-threads=8, 40 runs 40 of 40
scratch: try_reserve_backing back to move_list(s, list, backing) (old backing detached before Reset succeeds), each new test alone reset_list_preserves_… fails (s.backings[&old].users.contains(&list)), forget_racing_… fails; forget_does_not_… passes
scratch: forget drops a busy backing instead of pushing it to orphaned (the old behaviour), each new test alone forget_does_not_… fails (s.orphaned.iter().any(…)), forget_racing_… fails (committed forgotten backing must not recreate a zombie backing); reset_list_preserves_… passes
e2e test_title_draws_with_a_root_signature_under_the_debug_layer the same messages as main: 3× error id 93, 1× error id 1046, 1× warning id 820, 8× id 0 at exit

With both mutations, running the whole alloc_pool:: module fails 6 to 9 of its 12 tests, because one failure poisons the shared state for the rest; alone, only the tests above fail. Same RTX 3060 (driver 610.88), Rust 1.100.0, debug. Not tested: a title, AMD / Intel.

AI use: Claude Code (Claude Opus 5.5) ran the tests and mutations and wrote this rerun.


Rerun on dff6edc: still passed on NVIDIA.

result
cargo test --workspace --no-fail-fast -- --test-threads=4, dff6edc merged onto main b49be18 (clean) 1440 passed, 0 failed, 47 ignored; 25 SKIPPED lines
alloc_pool:: + title_list:: + bind:: + console_list:: + real::dispatch_chain:: (29 tests), --test-threads=8, 30 runs 30 of 30
hle::d3d12x::list_x::tests::, --test-threads=4, 100 runs 7 failed runs: a_dispatch_with_a_pipeline_still_building_waits_at_the_submit 7×, rotating_queue_… 1×, the two main flakes

Rerun on f796b9e: still passed on NVIDIA, and the new test was stable.

result
cargo test --workspace --no-fail-fast -- --test-threads=4, f796b9e merged onto main b49be18 (clean) 1438 passed, 0 failed, 47 ignored; 25 SKIPPED lines
the 3 new tests (now with stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets), alone, 40 runs each 40 of 40 each
alloc_pool:: + title_list:: + bind:: + console_list:: + real::dispatch_chain:: (27 tests), --test-threads=8, 30 runs 30 of 30
hle::d3d12x::list_x::tests::, --test-threads=4, 100 runs 6 failed runs, all a_dispatch_with_a_pipeline_still_building_waits_at_the_submit, the main flake
e2e debug-layer test the same messages as main (3× id 93, 1× id 1046, 1× warning id 820, 8× id 0)

First run, on 7879954: NVIDIA run: passed; both new tests stable, list_x no different from main in parallel, debug-layer messages as on main.

Tested: 7879954 merged onto main b49be18 (clean). RTX 3060 12 GB (driver 610.88), Ryzen 7 5700X, Windows 11 Pro 26300, Rust 1.100.0 MSVC, debug, Graphics Tools (D3D12 debug layer) installed.

result
cargo test --workspace --no-fail-fast -- --test-threads=4 1437 passed, 0 failed, 47 ignored; 25 SKIPPED lines
retired_segment_releases_backing_after_gpu_completes_while_preserving_in_flight, clean_title_reset_reclaims_idle_aside_backings_once, alone, 40 runs each 40 of 40 each
hle::d3d12x::alloc_pool:: + title_list:: + real::dispatch_chain:: (11 tests), --test-threads=8, 30 runs 30 of 30
hle::d3d12x::list_x::tests::, --test-threads=4, 100 runs 7 failed runs, only in a_dispatch_with_a_pipeline_still_building_waits_at_the_submit (7×) and rotating_queue_self_deadlock_… (3×), the two that flake on main the same way (#2118, #2547)
e2e test_title_draws_with_a_root_signature_under_the_debug_layer, merged vs main the same: 3× error id 93, 1× error id 1046, 1× warning id 820, 8× id 0 at exit

Not tested: a title run, Intel, a release build.

AI use: Claude Code (Claude Opus 5.5) ran the suite, the repeats and the debug-layer comparison, and wrote this report.

@luckyteagirl luckyteagirl 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.

At head 7879954925faaa048293f28857febf9eb8aa503b, the new bind::reset(primary, 0, 0) runs precisely when title_list::reset selects a stand-in because the primary PC list is still in flight (title_list.rs:157-201). bind::reset moves that primary recording's UMA blocks to console_list::PENDING under its old logical title allocator (bind.rs:75-87). A subsequent successful title-allocator Reset can swap to a different native backing while the old primary is still in flight, but real::alloc_reset unconditionally calls console_list::allocator_reset(this) on success (real.rs:7047-7057), which frees all pending blocks under that logical allocator. The GPU can therefore still read blocks freed by the new stand-in path. Before this PR, the stand-in branch did not transfer the primary's bind blocks at that point. Could those blocks stay owned by the old primary/native backing until its fence completes, with the pending-key/reset path tracking that backing rather than the logical allocator? A regression with a GPU-stalled primary, stand-in list reset, and title-allocator reset would distinguish the two lifetimes.

This is an exact-head source review; I did not run a GPU-stalled title reproduction. AI use: OpenAI Codex (GPT-6.2 Sol) traced the interleaving; I checked the bind, pool, and allocator-reset paths before posting.

@sage-sage

Copy link
Copy Markdown

Test report: passes on NVIDIA. Exact head 78799549 (its base is current main b49be18, so head = merged).

Tested

  • RTX 4080 SUPER (driver 621.40), Ryzen 5 7600X, Windows 11 26H2 build 26300.10075, rustc 1.100.0 MSVC, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug build
  • cargo test --workspace -- --test-threads=4: 1437 passed, 0 failed, 47 ignored; the 2 new tests pass
  • SKIPPED: 29 lines, the same as on main on this machine (wave64, debug layer, Developer Mode, heap windows)

Not tested

  • No game, so not split segments and allocator reuse on a title.

Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

@Saksukella

Copy link
Copy Markdown
Author

Good catch @luckyteagirl — fixed in f796b9e6. bind::State.allocator (and thus console_list::PENDING) is now keyed by the native PC allocator backing (alloc_pool::recording_backing / alloc_pool::current) rather than the logical title allocator, and console_list::allocator_reset now runs inside real::reset_pc_allocator (and for free backings in alloc_pool::forget) rather than unconditionally on alloc_reset(this). Added the regression test stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets covering a GPU-stalled primary, stand-in reset, title-allocator swap reset, and post-fence reclaim. Re-ran alloc_pool (7/7), bind (8/8), title_list (3/3), and a 60s RX 9070 XT smoke run (1669 frames, 0 removals, 0 crashes).

@Kalmarv

Kalmarv commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

A gap in retire_recording's call sites, found while reading this PR next to #2404 (a code read, not a run). At 068671d:

  • A list split mid-recording that the title submits with KickoffX goes through title_list::reclaim_for_kickoff (list_x.rs:3330). That moves the reclaimed segments, the active one included, into the wrapper's spares (title_list.rs:344) without retire_recording.
  • They are submitted just after: prior in the loop that follows, and the active segment at alloc_pool::executed(q_raw, &one) (list_x.rs:3355). After that they stay in their old backing's users, the way the Reset path's segments did before this PR. So that PC allocator stays "aside with a list on it" until the spare is reset elsewhere.
  • Here the detach has to come after executed() marks them. Detached before it, the submit would leave their backing unmarked, and the backing could be reset while the GPU runs it.

Suggested fix: call super::alloc_pool::retire_recording(seg); in the for seg in reclaimed loop at list_x.rs:3377-3380 (next to bind::reset and clear_segment_state), which runs after line 3355.

AI use: Claude Code with Claude Opus 5.5 read the code and wrote this note.

@Saksukella

Copy link
Copy Markdown
Author

Good catch @Kalmarv — added super::alloc_pool::retire_recording(seg); in the KickoffX reclaimed-segments loop at list_x.rs (after alloc_pool::executed marks them) in dff6edc7 (along with dropping an orphaned ResetCurrent backing if forget raced). Re-ran alloc_pool::tests (9/9) and 60s RX 9070 XT smoke (1669 frames, 0 removals, 0 crashes).

@thehollowedone

Copy link
Copy Markdown
Contributor

Exact-head allocator lifetime check on dff6edc7 (including the new KickoffX change). I found two paths the current nine allocator tests do not cover. Both fail with the test-only witnesses below; the existing nine pass.

  1. The previous backing can be reset while a list's native Reset is still pending. try_reserve_backing moves a list from old backing A to current backing B before calling native Reset(B). If a concurrent title allocator reset reclaims the now apparently free A, and Reset(B) fails, rollback_backing restores the list→A mapping after A's commands have been discarded. The witness starts with a closed recording on A, resets toward B, reclaims A inside the reset callback, returns E_FAIL, and observes A was reset. The existing rollback test starts with no previous recording. Reservation · Reset/rollback. Microsoft says an allocator reset reuses the memory behind recorded commands and must wait for GPU work on that allocator: allocator Reset contract.
  2. Final release can discard pending UMA ownership for a busy original backing. After A is put aside for B, forget(A) visits [A, B, A]. The first A visit removes its busy Backing; the second sees no record, treats A as free, and calls console_list::allocator_reset(A). The witness leaves A held by a live recording and confirms its pending UMA entry has disappeared. With actual UMA blocks, that reset path calls free_uma. Release loop · UMA release.

For the first path, reserve B while keeping A's existing user until native Reset succeeds; then move the association. On failure, release only the temporary B reservation. For the second, deduplicate backing IDs before inspecting/removing them. Deduplication alone prevents the early drain but does not solve eventual cleanup: a busy backing's pending UMA and fence/list ownership must survive final title-allocator release until safe reclamation, including allocator-address reuse.

Tested: Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, rustc 1.99.1 MSVC, debug. On this head with only the two test functions added:

  • cargo test --offline --locked -p xcl --lib reset_list_preserves_previous_backing_until_native_success -- --nocapture --test-threads=1: 0 passed, 1 failed; previous A was reset before the native callback returned.
  • cargo test --offline --locked -p xcl --lib forget_does_not_release_a_busy_original_backing_twice -- --nocapture --test-threads=1: 0 passed, 1 failed; pending entry was empty.
  • Existing hle::d3d12x::alloc_pool::tests with those two names skipped: 9 passed, 0 failed.
Test-only diff against dff6edc
diff --git a/crates/xcl/src/hle/d3d12x/alloc_pool.rs b/crates/xcl/src/hle/d3d12x/alloc_pool.rs
index df8a39e..f558306 100644
--- a/crates/xcl/src/hle/d3d12x/alloc_pool.rs
+++ b/crates/xcl/src/hle/d3d12x/alloc_pool.rs
@@ -1092,6 +1092,66 @@ mod tests {
         unsafe { forget(alloc) };
     }
 
+    #[test]
+    fn reset_list_preserves_previous_backing_until_native_success() {
+        let mut ids = Box::new([0u8; 5]);
+        let base = ids.as_mut_ptr() as usize;
+        let (alloc, old, current, spare, list) = (base, base + 1, base + 2, base + 3, base + 4);
+        {
+            let mut g = STATE.lock().unwrap();
+            let s = g.get_or_insert_with(State::default);
+            s.types.insert(alloc, D3D12_COMMAND_LIST_TYPE_DIRECT.0);
+            s.cur.insert(alloc, current);
+            s.aside.insert(alloc, vec![old, spare]);
+            s.backings.insert(spare, Backing { already_reset: true, ..Backing::default() });
+            move_list(s, list, old);
+        }
+
+        let mut native_resets = Vec::new();
+        let hr = reset_list(list, alloc, D3D12_COMMAND_LIST_TYPE_DIRECT.0, |backing| {
+            assert_eq!(backing, current);
+            let mut g = STATE.lock().unwrap();
+            let s = g.as_mut().unwrap();
+            assert_eq!(
+                unsafe { title_reset_in(s, alloc as *mut c_void, |raw| {
+                    native_resets.push(raw as usize);
+                    0
+                }) },
+                Some(0)
+            );
+            crate::util::E_FAIL
+        });
+
+        assert_eq!(hr, crate::util::E_FAIL);
+        assert_eq!(recording_backing(list), Some(old));
+        assert!(!native_resets.contains(&old), "the previous recording was reset before native Reset succeeded");
+    }
+
+    #[test]
+    fn forget_does_not_release_a_busy_original_backing_twice() {
+        let mut ids = Box::new([0u8; 3]);
+        let base = ids.as_mut_ptr() as usize;
+        let (alloc, next, list) = (base, base + 1, base + 2);
+        {
+            let mut g = STATE.lock().unwrap();
+            let s = g.get_or_insert_with(State::default);
+            s.types.insert(alloc, D3D12_COMMAND_LIST_TYPE_DIRECT.0);
+            s.aside.insert(alloc, vec![alloc]);
+            s.cur.insert(alloc, next);
+            move_list(s, list, alloc);
+            s.backings.entry(next).or_default().users.insert(list + 1);
+        }
+        super::super::console_list::hold_until_reset(alloc, vec![0x1111]);
+
+        unsafe { forget(alloc) };
+
+        assert_eq!(
+            super::super::console_list::take_pending_for_test(alloc),
+            vec![0x1111],
+            "a live old recording must keep its pending UMA blocks"
+        );
+    }
+
     #[test]
     fn reset_list_waits_while_backing_is_resetting() {
         let mut ids = Box::new([0u8; 2]);

These are synthetic state tests; they do not reproduce a retail crash or measure GPU memory pressure. I did not run the full workspace suite or paired smoke on this head. No game files or diagnostics were used.

AI use: Codex (GPT-6.2 Sol) inspected the paths, added and ran the witnesses, and drafted this comment; Codex (GPT-6.2 Astra) independently reviewed the allocator lifetimes.

@Saksukella

Copy link
Copy Markdown
Author

Thanks @thehollowedone — both lifetime witnesses are fixed in 59cc732a + 1a3b6981:

  1. try_reserve_backing now pins the target backing without detaching prev until native Reset succeeds (commit_backing detaches old on success; rollback_backing releases only the temporary target reservation on failure).
  2. forget(alloc) now sorts & deduplicates backing IDs before inspection and moves any still-busy backing into State.orphaned (detached from s.backings for address-reuse safety while preserving its users/marks across executed/retire_recording/forget_list/title_reset until safe reclamation, including concurrent forget racing with reset_list and finish_aside).

Added reset_list_preserves_previous_backing_until_native_success, forget_does_not_release_a_busy_original_backing_twice_and_reclaims_when_idle, and forget_racing_mid_reset_list_cleans_up_on_rollback_and_commit (12/12 alloc_pool::tests pass) and re-ran 60s RX 9070 XT smoke (1669 frames, 16379 MB, 0 removals, 0 crashes).

@Decodere

Copy link
Copy Markdown
Contributor

Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2707 at 1a3b698195d70f8c7d36fdd87678e2ed4df7bc00 (parent 59cc732a32bb3e838012844d370eba03a55ba0a2; merge-base 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 (1a3b6981)

  • cargo test --release -p xcl --lib hle::d3d12x::alloc_pool:: -- --test-threads=4 (3 consecutive parallel runs): 12 passed, 0 failed, 0 ignored × 3 (0.22 s, 0.20 s, 0.23 s, 0 skipped, exit 0), covering all 8 new lifetime/concurrency tests (retired_segment_releases_backing_after_gpu_completes_while_preserving_in_flight, clean_title_reset_reclaims_idle_aside_backings_once, stalled_primary_stand_in_reset_keeps_uma_blocks_until_native_backing_resets, reset_list_blocks_concurrent_title_reset_and_rolls_back_on_failure, reset_list_waits_while_backing_is_resetting, reset_list_preserves_previous_backing_until_native_success, forget_does_not_release_a_busy_original_backing_twice_and_reclaims_when_idle, and forget_racing_mid_reset_list_cleans_up_on_rollback_and_commit).
  • cargo test --release -p xcl --lib hle::d3d12x::bind:: -- --test-threads=4: 8 passed, 0 failed, 0 ignored (0.32 s, 0 skipped, exit 0).
  • cargo test --release -p xcl --lib hle::d3d12x::title_list:: -- --test-threads=4: 3 passed, 0 failed, 0 ignored (0.02 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.69 s, 0 skipped, exit 0).
  • cargo test --release -p xcl --lib hle::d3d12x::real:: -- --test-threads=4: 60 passed, 0 failed, 0 ignored (0.66 s, 0 skipped, exit 0).

Observations

  • All 123 targeted release tests across all 5 modified modules (alloc_pool::, bind::, title_list::, list_x::, real::), including 3 consecutive parallel passes of alloc_pool::, passed cleanly on this RTX 4060 host with 0 skips and 0 flakes.
  • Quiet 60 s retail smoke ran cleanly (exit: 0x0, 1564 frames shown, 60 60 60 steady-state presents per 2 s, 0 device removals, 0 crashes, 13964 MB peak commit vs origin/main b49be183's 14018 MB / 1518 frames).

Paired 60 s RTX 4060 smoke (b49be183 vs 1a3b6981)

Merge-base 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 #2707 head (1a3b6981):

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

Limits of coverage

  • Full workspace test suite was not re-run on 1a3b6981 (only targeted alloc_pool::, bind::, title_list::, list_x::, and real:: release tests plus paired quiet 60 s smoke).
  • The quiet 60 s no-input menu/intro smoke verifies no runtime regression on the baseline path rather than long-session world-load idle aside-allocator reclamation under heavy churn (reclamation and concurrent reset/forget races are exercised by the alloc_pool::tests suite above).
  • 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 and smoke blocks were taken directly from cargo test and scripts/smoke.ps1 outputs.

Osanchez pushed a commit to Osanchez/xcl that referenced this pull request Nov 26, 2026
Runs 4-6 on an RTX 5080 grew non-local video memory to 45 GB within a
minute of the first intro frames and ended in E_OUTOFMEMORY and a device
removal; run 7 with XCL_ALLOC_SWAP=0 stayed near 16 GB. The entry records
the cause and the user's decision to adopt xcl-dev#2725, xcl-dev#2549, xcl-dev#2581 and xcl-dev#2707
through the gate.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018RbZY1Ag73eDeCUZHpW3is
Osanchez pushed a commit to Osanchez/xcl that referenced this pull request Nov 26, 2026
Commit:   1a3b698
Reviewer: Claude Code (Claude Opus 5.5), Opus worker, full read (findings)

Review findings, none stopping the merge: most new unit tests drive the
test-only copy title_reset_in, not the rewritten title_reset; xcl-dev#2725 must
be ported onto the new title_reset instead of merged; reset_list can
return E_FAIL after 5 s on a resetting backing.

Conflict in crates/xcl/src/hle/d3d12x/alloc_pool.rs (reset_list): our
side has the telemetry_list_reset call, the PR replaces the bookkeeping.
The PR's bookkeeping is taken and the telemetry call is kept after every
successful native Reset, also on the PR's new early-return path.
Osanchez pushed a commit to Osanchez/xcl that referenced this pull request Nov 26, 2026
…s are left out

With draws off the title's thread, a retail title on an RTX 5080 still
stopped presenting 70 s after its loading screen: 31 of 32 compute waits
built the pipeline in the call (up to 15 s each), and it then sat for
450 s behind about 35 ray-tracing resolve programs of 700 to 940 KB of
DXIL that take up to 167 s each in the driver compiler.

A waiting compute bind no longer takes the build job: the build is marked
wanted, goes ahead of the workers' queue and is waited for, at most
XCL_PSO_COMPUTE_WAIT_MS (default 120 s, 0: no limit); after that the
pipeline is late and its dispatches are skipped until it is built.
XCL_PSO_IMAGE_SKIP is now on unless set to 0: a big compute program that
writes only images is not waited for and not put off to the submit. It
writes no buffer, so no ExecuteIndirect can read stale counts from it.

Tested on Windows 11, RTX 5080, driver 32.0.16.2140, on top of xcl-dev#2581,
xcl-dev#2549 and xcl-dev#2707:
cargo test -p xcl --lib -- pso_async:: bind:: list_x:: alloc_pool::
title_list:: : 95 passed, 0 failed; whole suite 1639 passed, 4 failed
(the dxil fuzz_validate_and_gpu_0..3 that fail on this GPU without the
change), 47 ignored, 45 SKIPPED lines. Not tested on AMD. Unit U5 of the
stall-fix entry in decisions.md.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018RbZY1Ag73eDeCUZHpW3is
@throny

throny commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

Two contributors checked independently and found that #2138 solves the same problem in a different way: #1607, group D132. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

@Saksukella

Copy link
Copy Markdown
Author

Thanks for the triage note! Quick comparison for maintainers: #2707 is a minimal single-file fix confined to alloc_pool.rs (already picked into amd-dev as c5951d21), whereas #2138 addresses the broader cross-module list/binding retirement across 5 files (alloc_pool.rs, bind.rs, console_list.rs, list_x.rs, real.rs). Happy to defer to whichever approach maintainers prefer on main.

@throny

throny commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Two contributors checked independently and found that #1071 #1453 #2936 solves the same problem in a different way: #1607, group D147. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

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.

8 participants