perf(agent): bound the generation-6 copy path - #1358
Open
appcypher wants to merge 4 commits into
Open
Conversation
Stream guest-to-host copies into atomic temporary destinations and move owned buffers through the SDK, relay, console, and agentd without redundant full-frame staging. Replace payload-bearing unbounded queues and polling loops with byte-accounted admission, bounded channels, capacity wakeups, cursor-based decoding, and short-write-safe vectored output while preserving the generation-6 wire format.
Use the same bounded temporary-file streaming path on Windows and Unix instead of rejecting a previously supported SDK operation. Let tempfile publish the completed sibling file atomically on each platform, preserve existing permissions, and keep Unix-specific mode and symlink assertions scoped to Unix tests.
5 tasks
Resolve the libkrun console APIs from the exact signed prerequisite revision so the cross-repository PR stack compiles in CI before the crates.io release. Compile the partial-fragment helper only on Unix, where the custom console backend uses it, to keep Windows clippy free of dead code.
Import bytes::Buf only where the Unix custom console backend compiles its partial-fragment reader, keeping Windows clippy free of unused imports.
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.
TL;DR
Bound the existing agent transport and remove redundant copies before changing the wire protocol.
Description
The same fresh exact-head comparison is shown on every PR in this stack. “After” means all four PRs together at
7f3f44ce, with automatic dual-port selection andlocal-shm-v1enabled; the original baseline is05f53e7a. Both profiles ran twice in ABBA order.Environment: OVH Advance-4, Linux/KVM, 1-vCPU guest, host CPU 8 affinity, guest tmpfs, public Rust SDK, verified payload hashes, and empty stderr. After artifacts were rebuilt from
7f3f44ceagainst libkrunff087a1.Test Plan