Skip to content

Add mailbox resume network handoff#249

Closed
sjmiller609 wants to merge 2 commits into
codex/instrument-guest-execfrom
codex/avoid-first-vsock-after-resume
Closed

Add mailbox resume network handoff#249
sjmiller609 wants to merge 2 commits into
codex/instrument-guest-execfrom
codex/avoid-first-vsock-after-resume

Conversation

@sjmiller609
Copy link
Copy Markdown
Collaborator

Summary

  • add a guest-agent resume-network mailbox that lets the host patch the fork snapshot memory before Firecracker resume
  • apply fresh MAC/IP/gateway in-process with netlink, avoiding host-initiated vsock/gRPC in reconfigure_guest_network
  • add perf probes for mailbox, UDP network-ready ack, VMGenID detection, and fork resume timings

Benchmarks

Remote host: deft-kernel-dev, Firecracker, 1 vCPU, 20 forks.

  • correctness: 20/20 passed with guest MAC/IP verified
  • reconfigure_guest_network_ms: 0 on every iteration
  • fork return time: mostly 135-193ms, range 135-331ms
  • guest mailbox observed after resume_vm: ~228ms avg, range 206-317ms
  • guest applied network after resume_vm: ~231ms avg, range 208-319ms
  • mailbox observed to netlink applied: usually 2-3ms

Validation

  • go test ./lib/system/guest_agent ./lib/guest ./lib/hypervisor/firecracker
  • remote: make build-embedded
  • remote: HYPEMAN_RUN_RECONFIGURE_GUEST_NETWORK_PERF=1 HYPEMAN_RECONFIGURE_GUEST_NETWORK_PERF_ITERS=20 HYPEMAN_RECONFIGURE_GUEST_NETWORK_GUEST_INITIATED=1 HYPEMAN_RECONFIGURE_GUEST_NETWORK_GUEST_PREARM=1 HYPEMAN_RECONFIGURE_GUEST_NETWORK_GUEST_MAILBOX=1 go test ./lib/instances -run TestReconfigureGuestNetworkPerf -count=1 -v

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 30, 2026

✱ Stainless preview builds for hypeman

This PR will update the hypeman SDKs with the following commit message.

feat: Add mailbox resume network handoff

Edit this comment to update it. It will appear in the SDK's changelogs.

hypeman-openapi studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅

hypeman-go studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

go get github.com/stainless-sdks/hypeman-go@9cbf74279160585cd608cec3a69c0677027e9752
hypeman-typescript studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ✅

npm install https://pkg.stainless.com/s/hypeman-typescript/af8a47871d6ed0ce104ca886e547589057f2b12b/dist.tar.gz

This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-05-30 19:11:05 UTC

@sjmiller609 sjmiller609 force-pushed the codex/avoid-first-vsock-after-resume branch from adb5810 to e65a64a Compare May 30, 2026 19:09
@sjmiller609 sjmiller609 changed the base branch from main to codex/instrument-guest-exec May 30, 2026 19:09
@sjmiller609
Copy link
Copy Markdown
Collaborator Author

Closing in favor of #253, which combines the main ReconfigureNetwork + mailbox/VMGenID path with the exploratory pieces trimmed out. Keeping the branch for reference.

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