Skip to content

Avoid a few locks #109117

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

Merged
merged 9 commits into from
Apr 5, 2023
Merged

Avoid a few locks #109117

merged 9 commits into from
Apr 5, 2023

Conversation

oli-obk
Copy link
Contributor

@oli-obk oli-obk commented Mar 14, 2023

We can use atomics or datastructures tuned for specific access patterns instead of locks. This may be an improvement for parallel rustc, but it's mostly a cleanup making various datastructures only usable in the way they are used right now (append data, never mutate), instead of having a general purpose lock.

@rustbot
Copy link
Collaborator

rustbot commented Mar 14, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @michaelwoerister (or someone else) soon.

Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (S-waiting-on-review and S-waiting-on-author) stays updated, invoking these commands when appropriate:

  • @rustbot author: the review is finished, PR author should check the comments and take action accordingly
  • @rustbot review: the author is ready for a review, this PR will be queued again in the reviewer's queue

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 14, 2023

@bors try @rust-timer queue

@rustbot rustbot added A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Mar 14, 2023
@rustbot
Copy link
Collaborator

rustbot commented Mar 14, 2023

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@rust-timer

This comment has been minimized.

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 14, 2023
@bors
Copy link
Collaborator

bors commented Mar 14, 2023

⌛ Trying commit 5ac97021ecaa10a9a71bbb1b02a5ac9034ecd998 with merge 373a5c1ab3f3ab2f54dcb45edd9e3a40a10783c9...

@bors
Copy link
Collaborator

bors commented Mar 14, 2023

☀️ Try build successful - checks-actions
Build commit: 373a5c1ab3f3ab2f54dcb45edd9e3a40a10783c9 (373a5c1ab3f3ab2f54dcb45edd9e3a40a10783c9)

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (373a5c1ab3f3ab2f54dcb45edd9e3a40a10783c9): comparison URL.

Overall result: ✅ improvements - no action needed

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

@bors rollup=never
@rustbot label: -S-waiting-on-perf -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.0% [-1.0%, -1.0%] 1
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
3.2% [2.1%, 4.3%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
4.9% [3.9%, 5.7%] 4
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.8% [-3.0%, -2.6%] 3
All ❌✅ (primary) - - 0

@rustbot rustbot removed the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Mar 14, 2023
@michaelwoerister
Copy link
Member

michaelwoerister commented Mar 14, 2023

Sounds good! I'll try to review within the next couple of days.

Copy link
Member

@michaelwoerister michaelwoerister left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! I've left a few comments below.

@rustbot
Copy link
Collaborator

rustbot commented Mar 15, 2023

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

@oli-obk
Copy link
Contributor Author

oli-obk commented Mar 15, 2023

@bors r=michaelwoerister

@bors
Copy link
Collaborator

bors commented Mar 15, 2023

📌 Commit da3d4abb103a3469a997a7b7b0a12ef8eda4214e has been approved by michaelwoerister

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 15, 2023
@bors
Copy link
Collaborator

bors commented Mar 18, 2023

⌛ Testing commit da3d4abb103a3469a997a7b7b0a12ef8eda4214e with merge c0a435cb4b538fcba4901b9da6615c3a8c8120a3...

@bors
Copy link
Collaborator

bors commented Mar 18, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 18, 2023
@rust-log-analyzer

This comment has been minimized.

@cjgillot
Copy link
Contributor

@bors retry SIGSEGV due to LLVM upgrade

@bors bors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 19, 2023
@bors bors added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 28, 2023
@rust-log-analyzer

This comment has been minimized.

@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 4, 2023

I can reproduce the segfault locally in parallel-rustc. Investigating...

@rustbot
Copy link
Collaborator

rustbot commented Apr 5, 2023

These commits modify the Cargo.lock file. Random changes to Cargo.lock can be introduced when switching branches and rebasing PRs.
This was probably unintentional and should be reverted before this PR is merged.

If this was intentional then you can ignore this comment.

@rust-log-analyzer

This comment was marked as outdated.

@oli-obk
Copy link
Contributor Author

oli-obk commented Apr 5, 2023

I fixed the issue upstream in elsa and updated our dependency to pick up the new version.

@bors r=michaelwoerister

@bors
Copy link
Collaborator

bors commented Apr 5, 2023

📌 Commit 457a162 has been approved by michaelwoerister

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 5, 2023
@bors
Copy link
Collaborator

bors commented Apr 5, 2023

⌛ Testing commit 457a162 with merge 383c1d7...

@bors
Copy link
Collaborator

bors commented Apr 5, 2023

☀️ Test successful - checks-actions
Approved by: michaelwoerister
Pushing 383c1d7 to master...

1 similar comment
@bors
Copy link
Collaborator

bors commented Apr 5, 2023

☀️ Test successful - checks-actions
Approved by: michaelwoerister
Pushing 383c1d7 to master...

@bors bors added merged-by-bors This PR was explicitly merged by bors. labels Apr 5, 2023
@bors bors merged commit 383c1d7 into rust-lang:master Apr 5, 2023
@rustbot rustbot added this to the 1.70.0 milestone Apr 5, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (383c1d7): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.7% [1.3%, 2.2%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.9% [-2.7%, -1.3%] 5
All ❌✅ (primary) - - 0

Cycles

This benchmark run did not return any relevant results for this metric.

@oli-obk oli-obk deleted the locks branch April 5, 2023 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants