Skip to content
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

fix: prevent Task.get deadlocks from threadpool starvation #6758

Merged
merged 1 commit into from
Jan 23, 2025

Conversation

Kha
Copy link
Member

@Kha Kha commented Jan 23, 2025

This PR prevents deadlocks from non-cyclical task waits that may otherwise occur during parallel elaboration with small threadpool sizes.

@Kha Kha added the changelog-compiler Compiler, runtime, and FFI label Jan 23, 2025
@Kha
Copy link
Member Author

Kha commented Jan 23, 2025

!bench

@github-actions github-actions bot added the toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN label Jan 23, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/batteries that referenced this pull request Jan 23, 2025
leanprover-community-mathlib4-bot added a commit to leanprover-community/mathlib4 that referenced this pull request Jan 23, 2025
@leanprover-bot
Copy link
Collaborator

Here are the benchmark results for commit ea69d56.
There were significant changes against commit 9b74c07:

  Benchmark                   Metric          Change
  ============================================================
+ big_do                      branch-misses    -1.6% (-22.3 σ)
+ big_omega.lean              task-clock       -2.5% (-15.6 σ)
+ big_omega.lean              wall-clock       -2.5% (-15.1 σ)
+ bv_decide_inequality.lean   branch-misses    -1.2% (-12.2 σ)
+ bv_decide_mul               branch-misses    -2.4% (-46.0 σ)
+ const_fold                  task-clock       -3.8% (-13.7 σ)
+ const_fold                  wall-clock       -3.9% (-14.2 σ)
+ language server startup     branch-misses    -2.2% (-10.1 σ)
+ language server startup     maxrss           -2.1% (-20.4 σ)
- nat_repr                    task-clock        4.7%  (12.1 σ)
- nat_repr                    wall-clock        4.5%  (14.0 σ)
+ stdlib                      type checking    -1.1% (-16.3 σ)

@leanprover-community-bot leanprover-community-bot added the builds-mathlib CI has verified that Mathlib builds against this PR label Jan 23, 2025
@leanprover-community-bot
Copy link
Collaborator

Mathlib CI status (docs):

@Kha Kha added this pull request to the merge queue Jan 23, 2025
Merged via the queue into leanprover:master with commit 214093e Jan 23, 2025
21 checks passed
@Kha Kha deleted the push-yxywyonxtmsx branch January 23, 2025 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
builds-mathlib CI has verified that Mathlib builds against this PR changelog-compiler Compiler, runtime, and FFI toolchain-available A toolchain is available for this PR, at leanprover/lean4-pr-releases:pr-release-NNNN
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants