Skip to content

perf(coro): fuse logical task runtime state - #158

Merged
cpunion merged 1 commit into
llvm-corofrom
coro/task-frame-allocation-20260811
Aug 11, 2026
Merged

perf(coro): fuse logical task runtime state#158
cpunion merged 1 commit into
llvm-corofrom
coro/task-frame-allocation-20260811

Conversation

@cpunion

@cpunion cpunion commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • fuse each spawned scheduler G and logical runtime context into one exact rooted task envelope
  • keep physical M/P only in executor or native contexts and lend them to a logical G for the physical resume interval
  • preserve the compiler spawn ABI with G at allocation offset zero and keep static command context ownership separate
  • add architecture source gates and record the rejected BDWGC size-class variants and final benchmark

Validation

  • full runtime test suite
  • all 20 native fleet E2E tests
  • linked defer, panic, channel and spawn E2E tests
  • native standard-Go compute, spawn, park, handoff, timer and parallel workloads
  • JS/WASM execution under Node
  • WASI malloc and WASI tinygogc execution under Wasmtime
  • JS/WASM, Linux ARM and RISC-V, and Cortex-M baremetal adapter builds

Performance

  • native64 dynamic task envelope: 264 + 104 = 368 bytes, down from separate BDWGC classes totaling 432 bytes
  • 10,000 parked G median RSS: 29,409,280 bytes versus Go 31,539,200 bytes
  • incremental cost at 10,000: about 2,166 B/G versus Go 2,802 B/G
  • exact-parent interleaved 10,000-G RSS: 30,375,936 to 29,442,048 bytes, down 3.07 percent
  • final short-workload medians show compute and handoff neutral with no displaced regression; stripped artifact grows 992 bytes

@cpunion
cpunion merged commit d2eff9b into llvm-coro Aug 11, 2026
17 checks passed
@cpunion
cpunion deleted the coro/task-frame-allocation-20260811 branch August 11, 2026 11:44
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