Repository navigation
rex3-jit: prioritise hot shader compiles over a full queue - #319
Merged
Merged
Conversation
The async shader compiler took work from one bounded SyncSender. A full channel dropped the request so the GFIFO consumer never blocked, but it made no distinction between a warm-up/prefetch shape and one the guest is drawing now: a boot-time profile flood could fill all 256 slots and starve the live draw, which then ran on the interpreter until the backlog drained. Give the compiler two lanes: a bounded cold lane for warm-up and prefetch, best-effort and retried later if rejected, and a hot lane for the draw path that is never rejected and is drained first. The worker parks on a condvar instead of spinning. The queue carries no Cranelift types, so its behaviour is unit-tested without a compiler.
This was referenced Oct 25, 2026
Contributor
Author
|
Evidence behind the change (the fork now requires this for every upstream PR):
If you would prefer the 263-entry profile as an in-tree regression fixture rather than a documented reproduction, say so and I'll add it. |
belikh
added a commit
to irix7/iris
that referenced
this pull request
Oct 25, 2026
techomancer#319, techomancer#320 and techomancer#321 are merged upstream and merged back; the send queue is renumbered around them.
Owner
|
ps after reconsideration this is probably a no-op nowadays. 500 or so rex3 shaders that are most commonly used are already monomorphised draw functions and are not using the compile queue. there are probably very little compile requests at all. we may want to revisit it and clean it up. |
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.
The async REX3 shader compiler takes work from one bounded channel (256 slots). A full channel drops the request so the GFIFO consumer never blocks, but it cannot tell a warm-up/prefetch shape from the one the guest is drawing right now. A boot-time profile flood can fill every slot and starve the live draw, which then runs on the interpreter until the backlog drains — 30-second waits in graphics tests.
Queuedmarker so a later draw retries.clanker/rex3/rex-jit-queue-retry.mdrecords the drop-and-retry contract.Tests:
cargo test --workspaceonupstream/main— 1332 passed, 0 failed.