feat: Prototype virtio-mem auto memory#167
Draft
lox wants to merge 7 commits into
Draft
Conversation
2d25312 to
5aae5f3
Compare
5aae5f3 to
0fd0a92
Compare
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.
spore run --memory autocurrently pays the full 16GiB guest startup cost before PID 1 can respond, even for tiny commands. The goal of this prototype is to makeautoboot like small memory while still exposing the 16GiB ceiling as elastic guest RAM.Design: fresh managed runs are the only path that opts into virtio-mem. They boot with 512MiB of normal RAM, advertise the remaining 15.5GiB as one grow-only virtio-mem region, then request the plug after the guest readiness path. Explicit memory sizes, custom
--kernel,SPOREVM_KERNEL_IMAGE, custom initrd, capture, and resume stay fixed-RAM so existing artifacts do not silently depend on hotplug. The virtio-mem device is shared virtio-mmio model code; HVF and KVM only do the backend-specific memory mapping behind the existing VM boundary.This moves the managed run kernel default to cleanroom-kernels
v0.6.0, and both the Zig resolver and shell helper verify the required hotplug config symbols before accepting a managed kernel.Developer impact: the public
--memory autosurface stays the same, but fresh managed runs can take the small-memory cold path while still growing to 16GiB after boot. This is intentionally a prototype: no pressure policy and no unplug policy.Local checks already run:
mise run test,mise run build, formatting/shell/diff checks, and HVF smokes. The managed/bin/truesmoke reportedram_mib=512,virtio_mem_mib=15872,response_ms=31; the custom-kernel guard reportedram_mib=16384,virtio_mem_mib=0; the delayed Alpine smoke reportedMemTotal: 16760636 kBafter plug.Kept draft until A1/KVM validation runs on the branch.