Cache per-part buffer spans in the heap sweep #337

Open
XaviFortes wants to merge 1 commit from upstream-pr/337 into main
XaviFortes commented 2026-11-26 17:29:28 +00:00 (Migrated from github.com)

Imported from avatarmanz/VIctory-7900XTX. Originally posted by XaviFortes on 2026-11-26T17:29:28Z.


Summary

Deduplicate descriptor slots selected by the rolling scan and the write journal. Cache buffer spans per sweep partition and rebuild a partition when a slot replacement or removal invalidates its span. Preserve the existing refresh cadence and unwatched-copy throttling.

Tested and benchmarked in VIctory-RDNA on an RX 7900 XT with Series X at 4K output. An earlier warm run reached a 42.5 ms heap-buffer pass before device removal. A later build with this change recorded an 8.55 ms final-minute median. The builds and scenes differed, so a controlled long-run A/B test would help isolate the gain.

Cherry-picked from f8eb38d. Happy to adjust the patch to upstream style.

<!-- greyfinch-sync:avatarmanz/VIctory-7900XTX:issue:6631979000 --> Imported from [avatarmanz/VIctory-7900XTX](https://github.com/avatarmanz/VIctory-7900XTX/pull/337). Originally posted by [XaviFortes](https://github.com/XaviFortes) on 2026-11-26T17:29:28Z. --- ## Summary Deduplicate descriptor slots selected by the rolling scan and the write journal. Cache buffer spans per sweep partition and rebuild a partition when a slot replacement or removal invalidates its span. Preserve the existing refresh cadence and unwatched-copy throttling. Tested and benchmarked in [VIctory-RDNA](https://github.com/XaviFortes/VIctory-RDNA) on an RX 7900 XT with Series X at 4K output. An earlier warm run reached a 42.5 ms heap-buffer pass before device removal. A later build with this change recorded an 8.55 ms final-minute median. The builds and scenes differed, so a controlled long-run A/B test would help isolate the gain. Cherry-picked from `f8eb38d`. Happy to adjust the patch to upstream style.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/337:upstream-pr/337'
git switch 'upstream-pr/337'

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.

git switch 'main'
git merge --no-ff 'upstream-pr/337'
git switch 'upstream-pr/337'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/337'
git switch 'upstream-pr/337'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/337'
git switch 'main'
git merge --squash 'upstream-pr/337'
git switch 'main'
git merge --ff-only 'upstream-pr/337'
git switch 'main'
git merge 'upstream-pr/337'
git push origin 'main'
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
avatarmanz/VIctory-7900XTX!337
No description provided.