Repository navigation
perf(net): remove coroutine frames from single-operation stream wrappers - #11
Closed
thweetkomputer wants to merge 6 commits into
Closed
thweetkomputer wants to merge 6 commits into
thweetkomputer wants to merge 6 commits into
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
thweetkomputer
force-pushed
the
perf/network-awaitables
branch
from
October 12, 2026 11:44
0f0514a to
1c9ba9b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TcpStream::ReadSome,WriteSome, andWriteSomeVcreate forwarding coroutine frames just to select raw or TLS I/O. Return awaitables from these thin wrappers so raw operations live in the caller's frame. Keep TLS's existing coroutine implementation and symmetric transfer.Companion integration: eloqdata/lavik#315.
Implementation
Validation
From the Lavik integration worktree:
Coverage includes immediate errors and empty operations, 100,000 immediate completions, half-close and EOF, short writes, iovec preservation, disconnects, TLS record refill, concurrent TLS reader/writer output locking, foreground/background execution, close_notify, and write failures. The concurrent TLS test uses an explicit peer barrier rather than relying on a fixed sleep.
The earlier CI failure was localized to awaiting EOF after data on a half-closed AF_UNIX socketpair with multishot receive enabled. The stream receive test now uses loopback TCP while retaining the same data-before-half-close timing and assertions. The full CI matrix passed with this transport-specific change; this PR does not alter the underlying AF_UNIX receive implementation. This host cannot register provided-buffer rings, so its local tests use the one-shot fallback.
Compatibility
Direct co_await syntax and results are preserved. Explicit Task-returning forwarding functions for the three converted wrappers need an adapted return type. Full-write APIs remain Taskabsl::Status. Awaitables are immovable because backend tags can refer to their storage.
The runtime TCP/TLS selection wrapper remains. On the local 64-bit host its read/write objects are 88/64 bytes. TLS helper and full-write coroutine frames remain. No service throughput or DPDK performance claim is made.