-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Only work-steal in the main loop for rustc_thread_pool #143035
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
@@ -52,6 +54,12 @@ struct ScopeBase<'scope> { | |||
/// latch to track job counts | |||
job_completed_latch: CountLatch, | |||
|
|||
/// Jobs that have been spawned, but not yet started. | |||
pending_jobs: Mutex<IndexSet<JobRefId>>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this swapped to IndexSet
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The lint is "prefer FxHashSet
over HashSet
, it has better performance".
Should I suppress it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The impact on performance needs to be measured with rustc-perf. For now, we can keep the original implementation :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It has been restored.
You should add me as a co-author for proper copyright assignment. |
Done |
This comment has been minimized.
This comment has been minimized.
@@ -796,14 +797,83 @@ impl WorkerThread { | |||
/// stealing tasks as necessary. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if this comment, which contains "stealing tasks", is still correct after we removed work-steal.
Co-authored-by: Zoxc <[email protected]>
Co-authored-by: Zoxc <[email protected]>
Co-authored-by: Zoxc <[email protected]>
This PR is a replica of rust-lang/rustc-rayon#12 that only retained work-steal in the main loop for rustc_thread_pool.
r? @oli-obk
cc @SparrowLii @Zoxc @cuviper
Updates #113349