Repository navigation
perf: compact coroutine and I/O state member layouts - #13
Open
thweetkomputer wants to merge 1 commit into
Open
thweetkomputer wants to merge 1 commit into
thweetkomputer wants to merge 1 commit 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
marked this pull request as ready for review
October 12, 2026 15:23
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.
Coroutine promises, cross-worker awaiters, and I/O state currently place small fields between pointer-aligned members. Group those fields to reduce padding while preserving member types, ownership, and execution behavior.
Measured on AArch64 with GCC 13.3 and Clang 18, with cross-core latency tracing disabled:
RemoteWorkSubmitAwaiterwith one pointer captureSubmitTaskAwaiterwith one pointer captureTask<absl::Status>::promise_typeTask<absl::StatusOr<size_t>>::promise_typeSizeIoAwaitableOpenFixedFileAwaitableConnectionKeep
RemoteWork's trace timestamps before its small bookkeeping fields so derived awaiters can reuse base tail padding with tracing enabled as well. Update the storage awaitable constructors to match declaration order. Promise savings depend on the result type;Task<int>is unchanged.Validation:
task_transfer_checkindependently built and passed with both compilers in Debug mode, including its 512 KiB stack, cancellation ownership, and reentrant callback cases.storage.cpppasses-Werror=reordersyntax checking.bycorf_*checks. Exact build/test commands are recorded in the companion Lavik PR.pre-commit run --files include/bycorf/io/storage.h include/bycorf/net/connection.h include/bycorf/runtime/cross_core.h include/bycorf/runtime/task.h src/io/storage.cppandgit diff --checkpass.These are public C++ layout changes, so consumers must rebuild together. No wire format, persistent format, cache-line isolation contract, or architecture flow changes. Local layout intent is documented near the affected members. The coroutine frame pool rounds allocations to size classes; smaller
sizeofalone does not establish an RSS or throughput improvement. Performance comparison is the follow-up.The benchmark baseline is the Lavik-pinned Bycorf commit
7904686; this branch intentionally excludes the unrelated newer DPDK transmit change.Companion integration and benchmark PR: eloqdata/lavik#317.