opt-in async HostList recycle with idle-pool work stealing #646
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
hle
input
INTEL
lighting
linux-proton
memory
MULDER
needs-info
needs-logs
needs-rebase
NVIDIA
performance
post-merge
pr-diagnostics
pr-docs
pre-merge
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
relevance
high
relevance
low
relevance
medium
relevance
very-high
rendering
report
roadmap-proposal
saves
series-s
shaders
startup
status
blocked-by-rework
status
needs-test-report
status
needs-triage
status
ready-for-review
status
stale
status
superseded
status
wip
tools
ui
upstream
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
TrustNo1/Darner!646
Loading…
Reference in a new issue
No description provided.
Delete branch "RileyW/Darner:pr/async-hostlist-recycle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Note: This exact Darner revision has not yet been run end-to-end in the game on Darner main. The same optimization has been running in gameplay on our Windows 10 (i7-8700, RTX 3080 20 GiB) fork, and this Darner port is opt-in (off by default via
DARNER_ASYNC_RECYCLE=1) and verified with both pure-CPU and live RTX 3080 D3D12 unit tests plus all workspace gates.Contributor role (optional)
What it changes
crates/darner-gpu/src/list.rs,recycle()resets every landedHostListsynchronously on the caller thread (the landing thread inhost::land()or the queue thread), running D3D12ID3D12CommandAllocator::Reset(),ID3D12GraphicsCommandList::Reset(), and COM drops inline for the whole batch.list::recycleadd avoidable CPU stalls to the landing and queue paths, delaying buffer landing and submission turnaround on CPU-bound systems.DARNER_ASYNC_RECYCLE=1switch (off by default viacrate::asked_for!, compatible withDARNER_AB) that drops upload memory and dynamic descriptor state immediately on the caller thread and hands eligible landedHostLists (up toIDLE_MOSTacrossIDLEplus pending) to a dedicateddarner-recyclebackground thread. Surplus lists still return preludes and read-backs immediately viagive_prelude()andrecycle_read_backs(), thread-spawn failure cleanly falls back to synchronousrecycle_one(), andfresh_list()steals and resets a pending list ifIDLEis empty so no extra command allocators are created.How it was tested
0754d9b(PR branch onc8258f9) and96096db(merged intoriley/allwith PR #631 for live Win10 SM 6.6 testing)cargo clippy --workspace --all-targets --locked -- -D warnings: passed (0 warnings)cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: passed (0 warnings)cargo xtask policyandcargo xtask policy --staged: passed (576 files ok)cargo test -p darner-gpu --lib --locked list::tests::async_recycle_room_caps_total_idle_plus_pending -- --exact: passed (1 passed, 0 failed)riley/allwithDARNER_TEST_AGILITY_DIRpointing at Agility SDK 1.620:cargo test -p darner-gpu --lib --locked list::tests::async_recycle_resets_landed_host_list_into_idle_pool -- --exact --nocapturepassed (1 passed, 0 failed, 0.29s)DARNER_ASYNC_RECYCLE=1, off by default until an in-game A/B check on Darner main)IDLEon RTX 3080, plus prior gameplay use on our Windows 10 i7-8700 + RTX 3080 fork.0754d9band96096dbChecklist
main.docs/asset-policy.md.Checked for overlap
[pr-performance][rendering] opt-in async HostList recycle with idle-pool work stealingto opt-in async HostList recycle with idle-pool work stealingTest needed — commit
0754d9b2; what to check:crates/darner-gpu/src/list.rs,recycle()resets every landedHostListsynchronously on the caller thread (the landing thread inhost::land()or the queue thread), running D3D12ID3D12CommandAllocator::Reset(),ID3D12GraphicsCommandList::Reset(), and COM drops inline for the whole batch.list::recycleadd avoidable CPU stalls to the landing and queue paths, delaying buffer landing and submission turnaround on CPU-bound systems.DARNER_ASYNC_RECYCLE=1switch (off by default viacrate::asked_for!, compatible withDARNER_AB) that drops upload memory and dynamic descriptor state immediately on the caller thread and hands eligible landedHostLists (up toIDLE_MOSTacrossIDLEplus pending) to a dedicateddarner-recyclebackground thread. Surplus lists still return preludes and read-backs immediately viagive_prelude()andrecycle_read_backs(), thread-spawn failure cleanly falls back to synchronousrecycle_one(), and `fresh_liEvidence to post: card + driver, settings, commit tested, before/after (switch off vs on, two runs each), fps median and p99, and one line saying you looked at the picture.
Reply
testingto take this run; it's free again after 24 h with no results.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.