Skip to content

perf: replace global task_finished_cv with per-task waiter notifications#13191

Draft
Kha wants to merge 1 commit intoleanprover:masterfrom
Kha:push-swlksoqnvynw
Draft

perf: replace global task_finished_cv with per-task waiter notifications#13191
Kha wants to merge 1 commit intoleanprover:masterfrom
Kha:push-swlksoqnvynw

Conversation

@Kha
Copy link
Copy Markdown
Member

@Kha Kha commented Mar 30, 2026

Instead of a single condition_variable that wakes all waiters on every task completion (thundering herd), use a per-task waiter map. task_get and wait_any register a stack-local CV for the specific task(s) they care about, and resolve_core only notifies those waiters.

Instead of a single condition_variable that wakes all waiters on every
task completion (thundering herd), use a per-task waiter map. task_get
and wait_any register a stack-local CV for the specific task(s) they
care about, and resolve_core only notifies those waiters.
@Kha
Copy link
Copy Markdown
Member Author

Kha commented Mar 30, 2026

!bench

@leanprover-radar
Copy link
Copy Markdown

leanprover-radar commented Mar 30, 2026

Benchmark results for 126d4c7 against 4786e08 are in. Significant changes detected! @Kha

  • build//instructions: -18.1G (-0.15%)

Small changes (41✅, 3🟥)

Too many entries to display here. View the full report on radar instead.

@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 Mar 30, 2026
@leanprover-bot
Copy link
Copy Markdown
Collaborator

Reference manual CI status:

  • ❗ Reference manual CI can not be attempted yet, as the nightly-testing-2026-03-25 tag does not exist there yet. We will retry when you push more commits. If you rebase your branch onto nightly-with-manual, reference manual CI should run now. You can force reference manual CI using the force-manual-ci label. (2026-03-30 16:56:33)

mathlib-nightly-testing bot pushed a commit to leanprover-community/batteries that referenced this pull request Mar 30, 2026
@github-actions github-actions bot added the mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN label Mar 30, 2026
mathlib-nightly-testing bot pushed a commit to leanprover-community/mathlib4-nightly-testing that referenced this pull request Mar 30, 2026
@Kha
Copy link
Copy Markdown
Member Author

Kha commented Mar 30, 2026

!bench mathlib

@leanprover-radar
Copy link
Copy Markdown

leanprover-radar commented Mar 30, 2026

Benchmark results for leanprover-community/mathlib4-nightly-testing@8e592bb against leanprover-community/mathlib4-nightly-testing@f80b5e4 are in. Significant changes detected! @Kha

Warning

These warnings may indicate that the benchmark results are not directly comparable, for example due to changes in the runner configuration or hardware.

  • Bench repo commit hashes for run main differ between commits.
  • 🟥 main exited with code 137

No significant changes detected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mathlib4-nightly-available A branch for this PR exists at leanprover-community/mathlib4-nightly-testing:lean-pr-testing-NNNN 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