-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
Upgrade elsa to the newest version. #136094
Conversation
rustbot has assigned @Mark-Simulacrum. Use |
These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
@bors r+ |
…mulacrum Upgrade elsa to the newest version. This was locked to 1.7.1 because of an error in the elsa release process that has since been fixed. Upgrading has the advantage that the elsa code runs properly in miri, at least with tree borrows. This was spawned from rust-lang#135870 (comment)
Rollup of 5 pull requests Successful merges: - rust-lang#135807 (Implement phantom variance markers) - rust-lang#136091 (Add some tracing to core bootstrap logic) - rust-lang#136094 (Upgrade elsa to the newest version.) - rust-lang#136097 (rustc_ast: replace some len-checks + indexing with slice patterns etc.) - rust-lang#136101 (triagebot: set myself on vacation) r? `@ghost` `@rustbot` modify labels: rollup
For some reason. #136111 (comment) @bors r- |
Triaged the problem, there is a new implementation of lock-free-vector in elsa, which accidentally only allows 65535 elements on 32 bit systems, which isn't enough for the rust compiler. I have submitted a PR upstream to fix this (Manishearth/elsa#81). Once a new version with that fix is released I'll update this PR The change in implementation, combined with the fact that this seems to be used in some core datastructures of the compiler means we may also want to do performance testing before merging this to check there is no significant regression in performance from the new tradeoffs. |
Converted this to draft to indicate that it is not suitable for merging currently |
3e34d4c
to
1b8a792
Compare
The underlying problem should hopefully be fixed now, at least as far as I can test it locally. Thanks to @Manishearth and @oli-obk for quickly handling this in the elsa repository. Note for the reviewer: There is a quite significant change in the datastructures provided by elsa with the new version. We may want to do a performance check to see this hasn't had any unwanted adverse effects. @rustbot ready |
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
Upgrade elsa to the newest version. This was locked to 1.7.1 because of an error in the elsa release process that has since been fixed. Upgrading has the advantage that the elsa code runs properly in miri, at least with tree borrows. This was spawned from rust-lang#135870 (comment)
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (ff31f83): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking 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. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary 1.9%, secondary 3.6%)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.
CyclesResults (secondary -3.4%)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.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 776.896s -> 775.156s (-0.22%) |
Having looked through the performance results, I think in this case, the top line result is somewhat misleading. Yes, this results in more instructions needing execution, however the underlying change of the crate also eliminates a lock on reading from some of its datastructures, meaning that this is likely not the best metric to focus on. Looking at other metrics such as cycles, wall time and cpu time, it seems that this is overall an improvement, though I haven't done the math to confirm that. Judging from those numbers it seems to me that for larger compile jobs it improves things a bit, and for smaller ones it degrades them a bit, which is not unexpected given that it eliminates lock contention at the cost of some instructions. In particular, the largest negative swings in runtime percentage wise exclusively happen with test cases already running significantly faster than .1s, so I don't think we need to be worried about those. @rustbot label: +perf-regression-triaged |
We could make the elsa data structures generic over the number of bins, growing each subsequent bin faster to make up for the lower number of bins. Then we can perf the bin size until we find a sweet spot for the compiler. Similarly we can be generic over the bin size of the first bin, because rustc will frequently use these data structures to store more than 3 elements. having a starting point at a multiple of that seems totally fine |
I'd suggest that once we got this merged. Then at least the dependency follows updates again. |
@bors r+ |
Upgrade elsa to the newest version. This was locked to 1.7.1 because of an error in the elsa release process that has since been fixed. Upgrading has the advantage that the elsa code runs properly in miri, at least with tree borrows. This was spawned from rust-lang#135870 (comment)
The job Click to see the possible cause of the failure (guessed by this bot)
|
💔 Test failed - checks-actions |
Hmm, there seems to be something going wrong with llvm. As far as I can tell this PR shouldn't affect llvm in any way. Not sure what happened here. |
Likely spurious @bors retry llvm-tblgen crashed while building LLVM |
☀️ Test successful - checks-actions |
Finished benchmarking commit (820bfff): comparison URL. Overall result: ❌ regressions - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (secondary 2.7%)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.
CyclesThis benchmark run did not return any relevant results for this metric. Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 779.293s -> 778.541s (-0.10%) |
Upgrade elsa to the newest version. This was locked to 1.7.1 because of an error in the elsa release process that has since been fixed. Upgrading has the advantage that the elsa code runs properly in miri, at least with tree borrows. This was spawned from rust-lang#135870 (comment)
This was locked to 1.7.1 because of an error in the elsa release process that has since been fixed. Upgrading has the advantage that the elsa code runs properly in miri, at least with tree borrows.
This was spawned from #135870 (comment)