Skip to content

D3D12.X: stop released lists holding allocator recordings - #1012

Closed
nova-aryan wants to merge 1 commit into
xcl-dev:mainfrom
nova-aryan:contrib/allocator-list-release
Closed

nova-aryan wants to merge 1 commit into
xcl-dev:mainfrom
nova-aryan:contrib/allocator-list-release

Conversation

@nova-aryan

Copy link
Copy Markdown
Contributor

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.

Forget final released command lists from allocator backing users while retaining pending-work fences and other recordings. Add synthetic lifecycle coverage; local execution is disabled at the user's request. Fixes xcl-dev#1010.
@ivall

ivall commented Nov 24, 2026

Copy link
Copy Markdown
Collaborator

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.

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.

D3D12.X: released command lists keep allocator backings busy

2 participants