Skip to content

GPU: avoid missed and repeated Linux native descriptor searches - #38

Open
gmankab wants to merge 2 commits into
spidercraft:linux-native-runtimefrom
gmankab:contrib/linux-native-descriptor-allocator
Open

gmankab wants to merge 2 commits into
spidercraft:linux-native-runtimefrom
gmankab:contrib/linux-native-descriptor-allocator

Conversation

@gmankab

@gmankab gmankab commented Nov 26, 2026

Copy link
Copy Markdown

The Linux native run on the RX 6800 exhausted the 65,536-slot dynamic descriptor reserve and logged at least 4,096 dropped commands. Repeating a full slot scan for each unavailable table adds CPU work while the reserve is under pressure.

  • Backport the search fix and the host-heap regression from Marvisak #974. The second pass can find contiguous allocations crossing the search cursor while still respecting the physical end of the heap.
  • Adapt the failure bound from Marvisak #2394 and its Fxceless source. Releasing slots updates the bound using the adjacent free run, so a newly possible allocation can succeed in the same frame. Command lists keep their descriptors through replay until reset or release.

Three host-heap tests passed on the RX 6800 and three passed on Lavapipe on this PR head. The integration branch passed six targeted checks on each backend. The CPU-only allocator harness matched a reference in all 41,472 small-heap cases, compared with 996 missed allocations in the old search. For 4,096 failed requests against 65,536 occupied slots, median time over seven synthetic bursts was about 668 ms with the cursor fix alone and 0.26 ms with the failure bound. The new build has not been measured in gameplay.

Tested-on: RX 6800 and Lavapipe, Fedora Linux 45, Linux native
Assisted-by: gpt-6.2 sol xhigh

pushkarreddyy and others added 2 commits November 26, 2026 22:59
The first pass can miss a run that starts before the search cursor.
The second pass needs up to n - 1 extra slots to see the whole run.
Keep the physical heap boundary between passes so descriptors are
always contiguous and recorded command lists can keep their slots.

Backport the allocator fix and the corrected host-heap regression from
the same upstream pull request.

Based-on: Marvisak#974
Tested-on: RX 6800, Fedora Linux 45, Linux native
Assisted-by: gpt-6.2 sol xhigh
Heavy Linux native frames can request thousands of dynamic tables
after command lists have occupied the reserve. A failed search proves
that larger requests cannot fit while the free runs only shrink.
Remember that bound under the allocator lock to skip repeated walks.

When a list releases slots, account for the free run that touches
them. Small, separated releases keep large failures cached. A release
that creates a large enough run admits the next allocation immediately,
with no per-frame search limit. Command-list ownership is unchanged.

Based-on: Marvisak#2394
Inspired-by: fxceless/victory-fork@788ea46
Tested-on: RX 6800 and Lavapipe, Fedora Linux 45, Linux native
Assisted-by: gpt-6.2 sol xhigh
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.

2 participants