Skip to content

perf(coro): amortize scheduler hot-path ownership - #159

Merged
cpunion merged 4 commits into
llvm-corofrom
coro/fast-source-gates-20260811
Aug 11, 2026
Merged

perf(coro): amortize scheduler hot-path ownership#159
cpunion merged 4 commits into
llvm-corofrom
coro/fast-source-gates-20260811

Conversation

@cpunion

@cpunion cpunion commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • keep source-owner hot gates constant time
  • batch up to eight adjacent timer or poll catalog entries per bounded reduction
  • resolve exact same-P channel completions through an owner-local scheduler FIFO
  • retain the managed-execution P lease across one bounded run slice and wake exact quota waiters
  • release an inherited lease before physical-owner succession

The fast paths preserve the existing external A/ack/B source protocol for cross-P, callback, timer, poller, and foreign-thread producers. Same-P channel publication never resumes a peer recursively or performs typed cleanup while the channel lock is held.

Validation

  • runtime internal/coro race and shuffled tests
  • exact native fleet, program, hchan, JS/WASM hchan and JS/WASM program adapters
  • complete runtime package tests
  • compiler effect tests with and without llgo tags
  • LLVM 22 native coroutine codegen and native fleet E2E
  • standard-library time, file, pipe, TCP and DNS acceptance
  • real JS/WASM time, freestanding file, host network, and TCP/DNS acceptance
  • focused generated-binary retirement stress loops
  • go vet for affected compiler and runtime packages

Performance, binary-size, and high-concurrency memory evaluation is intentionally deferred until this correctness change is integrated.

@cpunion
cpunion merged commit 95fe6e4 into llvm-coro Aug 11, 2026
17 checks passed
@cpunion
cpunion deleted the coro/fast-source-gates-20260811 branch August 11, 2026 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant