Skip the unified-memory BO scan for a single owner #233

Closed
github-bot wants to merge 1 commit from github-bot/gh-233 into main AGit
Owner

@⁠tommiehansen on GitHub · 2026-12-02 19:57 UTC · original
tommiehansen:perf/radv-local-bo-list → main · +19 −9 · 1 files · 1 commits · closed without merging

Change

Avoid walking the unified-memory buffer-object list during submission when all entries belong to the submitting winsys. The existing loop already excludes every such entry. Conservatively track the known common owner under the same lock used for list mutation and submission.

The mixed-owner path still reads the live handles and priorities in the original order. BO lifetime, allocation sizing, and GPU submission stay unchanged. In a single-owner workload, the skip reduces the filter's CPU work from one inspection per BO to a constant-time check.

Validation

  • The patch applies to pinned Mesa 26.3.1.
  • The extracted list implementation passed AddressSanitizer and UndefinedBehaviorSanitizer. It matched the previous implementation for 65,536 randomized submissions. A synthetic list of 4,096 local entries went from 4,096 inspections to zero.
  • A full Linux Mesa build and hardware benchmarking were unavailable during initial development.

Please compare submission CPU cost, p99 frame time and image parity at native 1080p on RX 9060 XT 16 GB and native 1440p on RX 9070 XT under Linux, with RT enabled and frame generation disabled.

Independent hardware testing

Both #248 and #233 were independently adopted by @⁠ultimatebash in PR #267 and are included in commit 9166acc0.

The combined configuration reported the following results on an AMD Radeon RX 6750 XT (12 GB VRAM), comparing the old configuration with the new short release run:

Metric Before After Change
Average FPS 19.3 22.3 +15.5%
1% low FPS 6.0 9.1 +51.7%
P99 frame time 167 ms 110 ms −34.1%
VRAM usage 10.86 GB 8.92 GB −17.9%

These are independently reported results for the combined configuration, including other RAM and VRAM management changes. The runs differ in duration, and the author reports substantial run-to-run variation in separate experiments. They do not establish the individual performance contribution of either PR, but they do provide evidence of successful integration and hardware exercise on AMD. Isolated A/B measurements and RDNA4 validation remain desirable.

**@⁠tommiehansen** on GitHub · 2026-12-02 19:57 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/233) `tommiehansen:perf/radv-local-bo-list` → `main` · +19 −9 · 1 files · 1 commits · closed without merging ## Change Avoid walking the unified-memory buffer-object list during submission when all entries belong to the submitting winsys. The existing loop already excludes every such entry. Conservatively track the known common owner under the same lock used for list mutation and submission. The mixed-owner path still reads the live handles and priorities in the original order. BO lifetime, allocation sizing, and GPU submission stay unchanged. In a single-owner workload, the skip reduces the filter's CPU work from one inspection per BO to a constant-time check. ## Validation - The patch applies to pinned Mesa 26.3.1. - The extracted list implementation passed AddressSanitizer and UndefinedBehaviorSanitizer. It matched the previous implementation for 65,536 randomized submissions. A synthetic list of 4,096 local entries went from 4,096 inspections to zero. - A full Linux Mesa build and hardware benchmarking were unavailable during initial development. Please compare submission CPU cost, p99 frame time and image parity at native 1080p on RX 9060 XT 16 GB and native 1440p on RX 9070 XT under Linux, with RT enabled and frame generation disabled. ## Independent hardware testing Both #248 and #233 were independently adopted by @⁠ultimatebash in [PR #267](https://git.gtahub.st/github/lobomfz--VIctory-xmem/pulls/267) and are included in [commit 9166acc0](https://github.com/ultimatebash/VIctory-xmem/commit/9166acc089012482fa06db595b272ceab94aec38). The combined configuration reported the following results on an AMD Radeon RX 6750 XT (12 GB VRAM), comparing the old configuration with the new short release run: | Metric | Before | After | Change | |---|---:|---:|---:| | Average FPS | 19.3 | 22.3 | **+15.5%** | | 1% low FPS | 6.0 | 9.1 | **+51.7%** | | P99 frame time | 167 ms | 110 ms | **−34.1%** | | VRAM usage | 10.86 GB | 8.92 GB | **−17.9%** | These are independently reported results for the combined configuration, including other RAM and VRAM management changes. The runs differ in duration, and the author reports substantial run-to-run variation in separate experiments. They do not establish the individual performance contribution of either PR, but they do provide evidence of successful integration and hardware exercise on AMD. Isolated A/B measurements and RDNA4 validation remain desirable.
Each submission walks the unified-memory BO list to collect only
objects owned by a different winsys. On a single-owner list the
walk can never add an entry.

Track the common owner under the existing BO-list write lock and
check it under the submission read lock. A mixed or unknown owner
keeps the existing scan. Preserve BO ordering, priorities, and the
buffer-list allocation and submission paths.

The Mesa patch applied cleanly. A sanitizer-enabled differential
test matched 65,536 randomized submissions. A fixture containing
4,096 local entries went from 4,096 inspections to zero.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 20:03:07 +00:00
Author
Owner

@⁠tommiehansen on GitHub · 2026-12-03 11:18 UTC · original

Independent hardware testing update: @⁠ultimatebash integrated this PR together with #248 in #267 (commit 9166acc0).

On an RX 6750 XT (12 GB), the combined configuration reported:

  • Average FPS: 19.3 → 22.3 (+15.5%)
  • 1% low FPS: 6.0 → 9.1 (+51.7%)
  • P99 frame time: 167 → 110 ms (−34.1%)
  • VRAM usage: 10.86 → 8.92 GB (−17.9%)

These results include other memory-management changes and compare runs of different durations, so they cannot be attributed to this PR alone. Nevertheless, they confirm external adoption and hardware exercise. I've updated the PR description with the evidence and its limitations. Isolated A/B testing would help establish the individual impact.

**@⁠tommiehansen** on GitHub · 2026-12-03 11:18 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/233#issuecomment-7376500262) Independent hardware testing update: @⁠ultimatebash integrated this PR together with #248 in #267 ([commit 9166acc0](https://github.com/ultimatebash/VIctory-xmem/commit/9166acc089012482fa06db595b272ceab94aec38)). On an RX 6750 XT (12 GB), the combined configuration reported: - Average FPS: 19.3 → 22.3 (**+15.5%**) - 1% low FPS: 6.0 → 9.1 (**+51.7%**) - P99 frame time: 167 → 110 ms (**−34.1%**) - VRAM usage: 10.86 → 8.92 GB (**−17.9%**) These results include other memory-management changes and compare runs of different durations, so they cannot be attributed to this PR alone. Nevertheless, they confirm external adoption and hardware exercise. I've updated the PR description with the evidence and its limitations. Isolated A/B testing would help establish the individual impact.
github-bot closed this pull request 2026-12-03 17:03:34 +00:00
Author
Owner

@⁠goldfishdev on GitHub · 2026-12-03 16:57 UTC · original

Superseded by #267, which carries this change and has 12 GB hardware testing. Closing to keep the review in one place.

**@⁠goldfishdev** on GitHub · 2026-12-03 16:57 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/233#issuecomment-7385741105) Superseded by #267, which carries this change and has 12 GB hardware testing. Closing to keep the review in one place.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.