Repository navigation
drm/asahi: g17: wait for render backing as long as for a compute queue - #1852
Open
DjDeveloperr wants to merge 1 commit into
Open
DjDeveloperr wants to merge 1 commit into
DjDeveloperr wants to merge 1 commit into
Conversation
A render whose pair or free-list backing does not fit the shared lower GPU VA window (ENOSPC) waits for capacity: idle backing is reclaimed and the publisher sleeps until a pair, lease or owner returns. That wait gave up after one job poll (2 s) and failed the unpublished render with EBUSY, which the client sees as a lost device. Under concurrent clients that create and destroy devices, other owners' backing comes back only as their pairs and pools are released, which regularly takes longer: a client then lost its device with no GPU fault at all, right after the window's first refusals. Bound the wait like a compute publication's wait for a queue, and like a render's wait for a channel (QUEUE_WAIT_NS from its start, still at most the recovery wait). The host test of the production wait now checks that bound; its attempt limits scale with the longer wait. Signed-off-by: Diljit Singh <hey@djdev.me>
DjDeveloperr
force-pushed
the
djdev/g17-capacity-waits
branch
from
November 13, 2026 19:03
ac881e8 to
e8ba050
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
G17P clients lost their device with no GPU fault and no recovery while several of them created and destroyed devices concurrently: the kernel logged
GPU work of a client failed (EBUSY, ...)right after the shared lower GPU VA window started refusing allocations, and the client sawVK_ERROR_DEVICE_LOST.A render whose pair or free-list backing does not fit the shared lower VA window waits for capacity: idle backing is reclaimed and the publisher sleeps until a pair, lease or owner returns. That wait was bounded at one job poll (2 s). Under concurrent clients, other owners' backing comes back only as their pairs and pools are released, which regularly takes longer, so the unpublished render failed with EBUSY. A compute publication waits up to
QUEUE_WAIT_NSfor the same kind of capacity, as does a render waiting for a channel.This bounds the render capacity wait the same way (
QUEUE_WAIT_NSfrom its start, still at most the recovery wait). It only lengthens a wait for unpublished work, which the scheduler's timeout already treats as not hung; nothing changes in what is published or how.tools/asahi/g17-capacity-backoff-tests.pynow checks the new bound (its storm and quiet cases end at the wait's bound with attempt limits scaled to the longer wait; the release case and both negative controls are unchanged).Testing (Neo, J700/G17P, test boot of the default kernel's module with this change on top):
🤖 Generated with Claude Code