D3D12.X: stop released lists holding allocator recordings #1005

Closed
nova-aryan wants to merge 1 commit from upstream-pr/1012 into main
nova-aryan commented 2026-11-24 10:23:46 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by nova-aryan on 2026-11-24T10:23:46Z.


Final command-list Release cleans up list_x state but leaves the list in its command allocator backing's users. That makes an otherwise idle backing permanently busy unless the address is reused, preventing reuse on later allocator resets. Remove the released list's recording association through the existing final-release cleanup hook. Fixes #1010.

What is in it

  • alloc_pool.rs: forget the released list in both association maps, preserving other live users and every submitted-work fence.
  • list_x.rs: connect this cleanup to the existing final-release path, also used by DMA lists.
  • Synthetic regression exercises the cleanup hook with two recording users and a COM fence: the other list holds the backing, then the pending fence holds it, and completion permits reuse. Also checks duplicate cleanup and fence-reference disposal. README documents the behavior.

Tested

  • Source inspection on main 6efdabc; git diff --check: exit 0.
  • Regression added but not compiled or executed. No local tests, builds, GPU workloads or game runs, at the user's request.

Regression run
Not run. Main/head retail smoke blocks are missing; keep this a draft pending Windows validation.

Not tested

  • Compilation, new regression execution, full workspace/GPU suite and real command-list lifetimes under driver load.
  • Expected negative control by source inspection: without the cleanup call the released lists remain in both maps, and the backing stays busy even once the synthetic fence completes. Not executed.
  • No measured retail memory/boot improvement or claim that this resolves the reported watchdog/null-write crash.

AI use
Codex (GPT-6) inspected the code, wrote the patch/regression and prepared this description. The exact backend model identifier was not provided in this session.

<!-- greyfinch-sync:ivall/xcl:issue:6579660651 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/1012). Originally posted by [nova-aryan](https://github.com/nova-aryan) on 2026-11-24T10:23:46Z. --- Final command-list Release cleans up `list_x` state but leaves the list in its command allocator backing's `users`. That makes an otherwise idle backing permanently busy unless the address is reused, preventing reuse on later allocator resets. Remove the released list's recording association through the existing final-release cleanup hook. Fixes #1010. **What is in it** - `alloc_pool.rs`: forget the released list in both association maps, preserving other live users and every submitted-work fence. - `list_x.rs`: connect this cleanup to the existing final-release path, also used by DMA lists. - Synthetic regression exercises the cleanup hook with two recording users and a COM fence: the other list holds the backing, then the pending fence holds it, and completion permits reuse. Also checks duplicate cleanup and fence-reference disposal. README documents the behavior. **Tested** - Source inspection on main `6efdabc`; `git diff --check`: exit 0. - Regression added but not compiled or executed. No local tests, builds, GPU workloads or game runs, at the user's request. **Regression run** Not run. Main/head retail smoke blocks are missing; keep this a draft pending Windows validation. **Not tested** - Compilation, new regression execution, full workspace/GPU suite and real command-list lifetimes under driver load. - Expected negative control by source inspection: without the cleanup call the released lists remain in both maps, and the backing stays busy even once the synthetic fence completes. Not executed. - No measured retail memory/boot improvement or claim that this resolves the reported watchdog/null-write crash. **AI use** Codex (GPT-6) inspected the code, wrote the patch/regression and prepared this description. The exact backend model identifier was not provided in this session.
upstream-sync closed this pull request 2026-11-24 11:05:24 +00:00
ivall commented 2026-11-24 11:05:58 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by ivall on 2026-11-24T10:47:00Z.


Thanks – your commit is b55c478 on main. Merged into main together with #1009, #1012 and #1023 (merge 384f7f7). Taken without its README sentence: the README tells users what works, and these are internal details. #1012 and #1023 both added code right after move_list and tests at the same place; the conflicts were resolved by keeping both.

Tested on the merged tree (it was not run before, so here it is):

  • cargo build --workspace: no warnings. cargo test --workspace --no-fail-fast -- --test-threads=4: 737 passed, 0 failed, 41 ignored, no SKIPPED.
  • Each new test fails with its fix undone: a_spare_whose_reset_fails_stays_available_for_retry (spare removed before the Reset), released_lists_leave_only_live_recordings_and_gpu_work_holding_the_backing (no forget_list in on_release), reset_commits_state_only_after_native_success_and_always_restores_vtable (association committed on a failed Reset).
  • Retail title, 90 s with scripted presses, against main before it the same way: no crash, no device removal, exit 0; 1500 frames against 1200; peak process commit 29.2 GB against 29.7 GB; the same allocator swap counts.
<!-- greyfinch-sync:ivall/xcl:comment:7129238629 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/1012#issuecomment-7129238629). Originally posted by [ivall](https://github.com/ivall) on 2026-11-24T10:47:00Z. --- Thanks – your commit is b55c478 on `main`. Merged into `main` together with #1009, #1012 and #1023 (merge 384f7f7). Taken without its README sentence: the README tells users what works, and these are internal details. #1012 and #1023 both added code right after `move_list` and tests at the same place; the conflicts were resolved by keeping both. **Tested** on the merged tree (it was not run before, so here it is): - `cargo build --workspace`: no warnings. `cargo test --workspace --no-fail-fast -- --test-threads=4`: 737 passed, 0 failed, 41 ignored, no SKIPPED. - Each new test fails with its fix undone: `a_spare_whose_reset_fails_stays_available_for_retry` (spare removed before the Reset), `released_lists_leave_only_live_recordings_and_gpu_work_holding_the_backing` (no `forget_list` in `on_release`), `reset_commits_state_only_after_native_success_and_always_restores_vtable` (association committed on a failed Reset). - Retail title, 90 s with scripted presses, against `main` before it the same way: no crash, no device removal, exit 0; 1500 frames against 1200; peak process commit 29.2 GB against 29.7 GB; the same allocator swap counts.

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