feat: default-disabled guest memory reclaim#129
Draft
sjmiller609 wants to merge 9 commits intomainfrom
Draft
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
There was a problem hiding this comment.
Automated Risk Assessment
Risk level: Medium-High
Why this is not low risk
- The PR changes shared VM startup behavior across all hypervisors (Cloud Hypervisor, QEMU, Firecracker, VZ) by adding guest-memory policy wiring into
instances+providers+ backend config translation. - It introduces new default-on runtime behavior (
hypervisor.memorydefaults enabled/reclaim on), which affects kernel args and balloon/reclaim device configuration for most instance launches. - It modifies infrastructure-sensitive startup paths (notably QEMU retry/fallback startup sequencing and VZ balloon attach behavior), which increases regression risk and operational blast radius.
Decision
- Code review is required.
- Self-approval is not applied for this risk level.
- Requested reviewers:
@rgarcia,@hiroTamada.
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.


Summary
lib/guestmemorypackage with normalized policy defaults, deterministic kernel-arg merge, and runtime behavior docshypervisor.memoryconfig into providers/instances without changing public APIVMConfig.GuestMemorytoggles and map them in Cloud Hypervisor, QEMU, Firecracker, and VZ backends/proc/<pid>/smaps_rollup) and macOS RSS for VZInvestigation Notes
Testing
go test ./lib/guestmemorygo test ./lib/instances -run '^TestGuestMemoryPolicyVZ$'sudo env ... HYPEMAN_RUN_GUESTMEMORY_TESTS=1 go test -count=1 -run '^TestGuestMemoryPolicyCloudHypervisor$' ./lib/instancessudo env ... HYPEMAN_RUN_GUESTMEMORY_TESTS=1 go test -count=1 -run '^TestGuestMemoryPolicyQEMU$' ./lib/instancessudo env ... HYPEMAN_RUN_GUESTMEMORY_TESTS=1 go test -count=1 -run '^TestGuestMemoryPolicyFirecracker$' ./lib/instancesmake test-guestmemory-linux