Skip to content

[clangd][unittests] Limit paralelism for clangd unittests #65444

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 0 commits into from

Conversation

kadircet
Copy link
Member

@kadircet kadircet commented Sep 6, 2023

We started seeing a lot of timeouts that align with the change in lit to
execute gtests in shards. The logic there assumes tests are
single-threaded, which is the case for most of the LLVM, hence they
pick #shards ~ #cores (by slightly overshooting).

There are enough unittests in clangd that rely on multi-threading, they
can create arbitrarily many threads but we limit amount of meaningful
work to ~4 thread per process.

This change ensures that we're accounting for that paralelism when
executing clangd tests and not overloading test executors.

In theory the change overestimates the requirements, not all tests are
multi-threaded, but it doesn't seem to be resulting in any regressions
on my local runs.

Fixes #64964.
Fixes clangd/clangd#1712.

@kadircet kadircet requested a review from a team as a code owner September 6, 2023 07:03
@kadircet kadircet requested a review from sam-mccall September 6, 2023 07:03
@github-actions github-actions bot added the clangd label Sep 6, 2023
@kadircet
Copy link
Member Author

kadircet commented Sep 6, 2023

@HighCommander4 @AaronBallman FYI

@AaronBallman
Copy link
Collaborator

Thank you!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
3 participants