Skip to content

revert(minimald): remove the 8 MiB guest vsock receive window - #925

Closed
norrietaylor wants to merge 1 commit into
mainfrom
fix/remove-8mib-vsock-window
Closed

revert(minimald): remove the 8 MiB guest vsock receive window#925
norrietaylor wants to merge 1 commit into
mainfrom
fix/remove-8mib-vsock-window

Conversation

@norrietaylor

@norrietaylor norrietaylor commented Jul 22, 2026

Copy link
Copy Markdown
Member

Reverts #922 (ff79c8c2), which restored the 8 MiB guest vsock receive window that #916 had removed.

The resulting crates/minimald/src/main.rs is byte-identical to its post-#916 state — a clean revert to a tree that was already green on main.

Why remove it

The window was always headroom, never the fix. It works by keeping a normal upload out of the fragmented tail where the guest's skb-overhead ceiling trips, but it does not change the ratio between the byte ceiling and the skb ceiling — so a large enough upload or a slow enough reader still reaches it. Against the real repo (141 MB compressed) the failure reproduces with the window in place.

The fragmentation itself is fixed one layer down, in libkrun (#921, approved): coalesce reads into full descriptors and wait briefly on EAGAIN rather than emit a packet too small to carry its own receive-queue accounting. Instrumentation showed 86% of the sub-skb packets come from the fill loop bailing on EAGAIN with descriptor space and credit both free — exactly what that patch addresses, and it measures 16/0 against 0/10.

With the real fix landing, the window is redundant complexity in minimald: an FFI setsockopt dance (SO_VM_SOCKETS_BUFFER_MAX_SIZE before SO_VM_SOCKETS_BUFFER_SIZE, read-back, best-effort logging) whose only purpose was to paper over the libkrun defect. Remove it and let #921 carry the fix.

Refs: #869

Note

Remove 8 MiB guest vsock receive window from minimald

Reverts the AF_VSOCK receive window size increase in main.rs. The set_vsock_rx_window helper, the VSOCK_RX_WINDOW_BYTES constant, and the call site in async_main are all removed. The vsock listener now uses kernel-default buffer sizes, and the associated debug/warn logs about window sizing are no longer emitted.

Macroscope summarized 2a10804.

Reverts commit ff79c8c (PR #922), which restored the window that #916 had
removed.

The window was headroom, never the fix. It works by keeping a normal upload
out of the fragmented tail where the guest's skb-overhead ceiling is tripped,
but it does not change the ratio between the byte ceiling and the skb ceiling,
so a large enough upload or a slow enough reader still reaches it. Measured
against the real repo (141 MB compressed) the failure reproduces regardless.

The fragmentation itself is fixed in libkrun (#921, approved): coalesce reads
into full descriptors and wait briefly on EAGAIN rather than emit a packet too
small to carry its own receive-queue accounting. With that landing, the
window is redundant complexity in minimald -- an FFI socket-option dance whose
only job was to paper over the libkrun defect -- so remove it.

Refs: #869
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You’ve reached a temporary PR review limit under our Fair Usage Limits Policy.

Your recent review volume is higher than typical usage, so adaptive limits are currently applied.

Next review available in: 35 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 792c6656-fe04-47ad-8f31-dd393e288018

📥 Commits

Reviewing files that changed from the base of the PR and between c01513b and 2a10804.

📒 Files selected for processing (1)
  • crates/minimald/src/main.rs

Comment @coderabbitai help to get the list of available commands.

@norrietaylor

Copy link
Copy Markdown
Member Author

Superseded by #924, which reverted the 8 MiB window on main. Closing in favour of that. The real fix is the libkrun-side change (#921 merged; #926 proposes replacing it with packet-count backpressure).

@norrietaylor
norrietaylor deleted the fix/remove-8mib-vsock-window branch July 25, 2026 04:35
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