perf(vk): memory_collect_written takes the captured ranges once a submit, not a lock and a pool-list refresh per dirty page #854
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!854
Loading…
Reference in a new issue
No description provided.
Delete branch "perf/collect-written-one-lock"
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?
For every page the host's collection returned, capture_owns took cap_ranges_mu, called refresh_pool_ranges_locked and searched the three range lists: thousands of lock cycles a submit, the cost that retired gpu_pages' per-page lock (the comment above memory_stamp_gpu). The union of the three lists is now built once, under the lock, and only when cap_ranges_ver changed (as capture_make keeps its own), and each page is tested against it with one binary search.
Tested: RTX 4070 SUPER, Windows 11, several sessions of Kokiri Forest and Hyrule Field over one evening: identical picture, no device loss; the per-submit "writes collected" time in the log stays at 0.03-0.06 ms with 400-470 dirty pages a submit.