Replace mark_(un)blocked with (un)park#155997
Conversation
|
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
|
r? @mu001999 rustbot has assigned @mu001999. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
r? @nnethercote |
|
Do I understand correctly that blocking no longer releases jobserver tokens? |
No, it does. Or am I missing something? |
|
Missed those calls. |
There was a problem hiding this comment.
Seems ok to me, though once again this is code I don't understand well.
@Zoxc: any thoughts before I approve?
| pub struct QueryWaiter<'tcx> { | ||
| pub parent: Option<QueryJobId>, | ||
| pub condvar: Condvar, | ||
| // FIXME: could be made u16 due to rustc_thread_pool limiting number of threads |
There was a problem hiding this comment.
I don't think shrinking this field will change the struct size because the other fields are all 64-bits (on 64-bit platforms). I suggest just removing the comment.
|
Let's check perf: @bors try @rust-timer queue |
|
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
|
⌛ Trying commit 0d8d68d with merge 03472e2… To cancel the try build, run the command Workflow: https://github.com/rust-lang/rust/actions/runs/25202610893 |
Replace `mark_(un)blocked` with `(un)park`
|
💥 Test timed out after |
|
It looks good to me. |
|
@bors try @rust-timer queue |
|
This pull request is already queued and waiting for a try build to finish. |
|
⌛ Trying commit 0d8d68d with merge ea11640… To cancel the try build, run the command Workflow: https://github.com/rust-lang/rust/actions/runs/25356066731 |
Replace `mark_(un)blocked` with `(un)park`
|
💥 Test timed out after |
|
huh |
|
This has timed out twice now. I suspect there is a problem with the PR, some kind of hang. |
|
It hangs on the LLVM build. I am unsure how this PR would've been able to cause any hang tbh. |
0d8d68d to
f6fb138
Compare
This comment has been minimized.
This comment has been minimized.
f6fb138 to
7107849
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
View all comments
So here's the thing. We can store condvar within rustc_thread_pool and do all of bookkeeping stuff there. I thought about making a
QueryLatcha simpleAtomicU64of which each bit represents a waiting thread ordered by its worker thread index. It's not as simple as that in this PR, but by moving query waiter's condvar we are finally able to useArc::get_mutfor thecyclesmart pointer.