Repository navigation
Conversation
…ak#2604) `ValueWait::holds` returned `None` both 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::pump` therefore counted an unreadable value's wait as an unknown comparison and ran the segment at once, before the work that would write the value, and `Held::blocked` left 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). `None` is left for a comparison we do not know, so the frame's unknown count says what it claims to. The test queues a wait on unmapped memory: nothing runs and no unknown is counted, `blocked` lists it; once the memory maps, the segment runs. On the old code it runs at once and counts one unknown.
necrobytes
left a comment
There was a problem hiding this comment.
An ALWAYS wait stalls on an unreadable address at 90293a1. I queued a consumer with that wait, pumped once, then queued a producer on a second queue that mapped the address and wrote 23. 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 the ALWAYS consumer immediately, with zero unknown comparisons. An EQUAL 23 control waits for the producer on both PRs. Could we consolidate on #2605, or carry its ALWAYS handling and regression test here? Earlier review and fix
AI-assisted review (Codex).
|
Consolidating on #2605: it is earlier, green, and already has the |
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.