Skip to content

coro: activate deferred syscall replacements from requests - #162

Merged
cpunion merged 1 commit into
llvm-corofrom
coro/deferred-replacement-20260814
Aug 14, 2026
Merged

coro: activate deferred syscall replacements from requests#162
cpunion merged 1 commit into
llvm-corofrom
coro/deferred-replacement-20260814

Conversation

@cpunion

@cpunion cpunion commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Summary

  • prepare the exact native syscall handoff and replacement slot without consuming a physical M
  • add a pointer-free one-word dispatch gate whose request/return race decides whether to start that replacement
  • route durable native source requests through one common physical tail after doorbell publication
  • close the direct-channel cross-route liveness cycle without timer, poll, worker, or an eager runtime waiter
  • document the race protocol, validation boundary, and measured temporary overhead

Validation

  • go test -p=1 -timeout=180s ./... in runtime/
  • go test -p=1 -timeout=180s ./cl -run 'Coro.*(Worker|Syscall)|Worker.*Coro|Syscall.*Coro'
  • deferred handoff state/race tests, 10 repeats
  • direct-channel and same-route channel/timer/poll replacement linked E2Es, 10 repeats
  • complete go test -p=1 -timeout=600s ./internal/build -run '^TestCoro' -count=1

The direct 500-operation syscall fixture is +6.7% versus the parent (about 95 ns per syscall); the standard os.File path is neutral. No physical M is started on the fast return path. Stripped size is +79,088 bytes (~1.1%).

A pre-existing LockedOrdinarySuspend abort flake was isolated against the merge parent: the parent failed 1/20 with the same bare abort. The final complete candidate run passed.

@cpunion
cpunion force-pushed the coro/deferred-replacement-20260814 branch from 252bca7 to 0564728 Compare August 14, 2026 14:29
@cpunion
cpunion merged commit ba27a73 into llvm-coro Aug 14, 2026
14 checks passed
@cpunion
cpunion deleted the coro/deferred-replacement-20260814 branch August 14, 2026 14:37
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