GPU: a wait on memory that cannot be read yet holds its queue (#2604) #2691
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2693"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-25T18:20:59Z.
Fixes #2604.
ValueWait::holdsreturnedNoneboth for a comparison we do not know (counted by the caller, taken as holding) and for memory that cannot be read, which the doc comment says is taken as not holding.Held::pumptherefore counted an unreadable value's wait as an unknown comparison and ran the segment at once, before the work that would write the value, andHeld::blockedleft it out of the unmet waits.Unreadable memory now returns
Some(false): the segment waits until the value reads (the 2 ms timer tests held work, and the 10 s safety valve still releases a wait nothing satisfies).Noneis left for a comparison we do not know, so the frame's unknown count says what it claims to and no longer includes waits that are merely early.The test queues a wait on unmapped memory: nothing runs, no unknown is counted, and
blockedlists it as not holding; once the memory maps, the segment runs. On the old code it runs at once and counts one unknown.Tests:
cargo test -p victory-gpu --lib --locked hold::(11 passed),cargo clippy -p victory-gpu --all-targetsclean.Imported from Marvisak/VIctory. Originally posted by necrobytes on 2026-11-25T18:28:31Z.
Review: CHANGES_REQUESTED
An
ALWAYSwait stalls on an unreadable address at90293a1. I queued a consumer with that wait, pumped once, then queued a producer on a second queue that mapped the address and wrote23. The first pump ran zero segments and listed the wait as unmet. The producer ran before the consumer. If the address stays unreadable, the consumer can sit until the 10-second safety valve.I ran the same fixture on #2605 (
5de820a). Its first pump runs theALWAYSconsumer immediately, with zero unknown comparisons. AnEQUAL 23control waits for the producer on both PRs. Could we consolidate on #2605, or carry itsALWAYShandling and regression test here? Earlier review and fixAI-assisted review (Codex).
Imported from Marvisak/VIctory. Originally posted by Calvix2k on 2026-11-25T18:34:37Z.
Consolidating on #2605: it is earlier, green, and already has the
ALWAYScase the review found missing here (anALWAYScomparison does not depend on the value, so an unreadable address must not stall it). Its body also carries the same unreadable-holds-queue change and the regression coverage, so there is nothing here to keep. Closing in its favour.Pull request closed