Use kernel paging for Cloud Hypervisor restores - #400
Draft
sjmiller609 wants to merge 1 commit into
Draft
Conversation
sjmiller609
force-pushed
the
hypeship/ch-kernel-paging
branch
from
August 11, 2026 20:55
be70d28 to
55956c4
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.
Summary
memory-rangeswithMAP_PRIVATEand lets the kernel fault pages in instead of eagerly copying all guest RAMNo UFFD path is involved.
Benchmark
8 GiB / 8 vCPU Chromium guest; source was CDP-ready before standby. Times are request-to-CDP-ready.
During the 25-way runs, baseline Cloud Hypervisor read 67.25 GiB from the host block device and lost 63.5 GiB of available host memory before all requests failed. The kernel-paged run read 8.4 MiB and its maximum available-memory drop was 5.24 GiB. These I/O windows include the stress tool's hold and cleanup period, so they are comparative rather than restore-only attribution.
Known limitation: later standby I/O
This removes Cloud Hypervisor's eager restore, but Cloud Hypervisor still writes a full memory image on every snapshot. After a fork ran idle for 10 seconds, a later standby wrote 8,193 MiB according to the service cgroup's
io.stat; Firecracker's dirty-page snapshot wrote 221 MiB. The Cloud Hypervisor request returned in 8.52 s but needed another 19.87 s to flush, versus 3.21 s + 96 ms for Firecracker.With 25 simultaneous explicit standby requests, both backends hit the 60-second API deadline. Cloud Hypervisor had written 19.0 GiB by then; Firecracker had written 6.4 GiB. Matching Firecracker here requires differential snapshot support in Cloud Hypervisor; Hypeman cannot recover the missing dirty-page information after Cloud Hypervisor has already emitted the full snapshot.
Validation
e2e-installmake buildgo test ./lib/hypervisor/cloudhypervisorgo test ./lib/instances -run 'TestCloneCloudHypervisorSnapshotSharesMemoryInode|TestEnsureExclusiveSnapshotMemoryOwnership' -count=1