-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
reduce threads spawned by ui-tests #81942
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
That failure is concerning. The original issue #69225 reported an out of bounds access that doesn't happen when codegen-units < 4. That issue was fixed and the reproducer at that time didn't depend on CGUs either. And yet here it is. 😕 |
I am worried about maintaining the complexity cost here, but the 10% does sound appealing. Could you see if we get similar effects from configuring a make jobserver (via the jobserver crate) with just 1 token? |
As far as I can tell from documentation |
Huh, that's annoying. I'll think some more about the tradeoff here, I guess. |
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.
Also note that in rustc the jobserver only restricts the number of concurent threads, it doesn't have an impact on codegen unit count. But the number of threads already...
Hm, I'm not sure who might be able to check the linker flags will generally do the right thing. I'm not myself really that familiar with our linker story today. cc @nagisa perhaps? |
It also looks like -no-threads might be preferable to the threads=1 option? That communicates intent a bit more clearly, maybe they have different handling internally? |
Otherwise this seems good to me - I think I'd like some more eyes on it for the linker stuff, so I'll nominate for a T-compiler meeting, but I think we could land after that. |
My only major concern here is that there may have been tests written for ICEs or soundness issues out there that relied on absence of |
That only seems to be available on lld 10. 11 only has the threads argument. |
This comment has been minimized.
This comment has been minimized.
c7a8445
to
ef9023c
Compare
This comment has been minimized.
This comment has been minimized.
Can't reproduce the issue locally even with |
ef9023c
to
9159029
Compare
@bors r+ |
📌 Commit fe66a93be4e93d111821cc9e71bb5569c4c77d5c has been approved by |
Could you at least leave FIXMEs (preferably referencing the opened issues) in tests to which this PR adds |
⌛ Testing commit fe66a93be4e93d111821cc9e71bb5569c4c77d5c with merge b1cf3c06ea8e8c923a48b7c03ed76376881dad59... |
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
Will do. I have looked at the test which I thought failed with a stderr diff again and it turns out it actually is another linker error. I'll file an issue for that too. |
fe66a93
to
67065f8
Compare
Added FIXMEs, bumped CGUs further for the latest failing test. |
This comment has been minimized.
This comment has been minimized.
the test harness already spawns enough tests for all cores, individual tests should keep their own threading to a minimum to avoid context switch overhead some tests fail with 1 CGU, so explicit compile flags have been added to keep their old behavior
67065f8
to
2786870
Compare
@bors r+ |
📌 Commit 2786870 has been approved by |
☀️ Test successful - checks-actions |
The test harness already spawns enough tests to keep all cores busy.
Individual tests should keep their own threading to a minimum to avoid context switch overhead.
When running ui tests with lld enabled this shaves about 10% off that testsuite on my machine.
Resolves #81946