Add UFFD snapshot pager#262
Conversation
9c706a1 to
fb5341c
Compare
38b3cf8 to
6c8c898
Compare
|
Created a monitoring plan for this PR. What this PR does: Adds opt-in lazy-memory paging for Firecracker snapshot restores using Linux UFFD. The default backend remains Intended effect:
Risks:
Status updates will be posted automatically on this PR as monitoring progresses. |
hiroTamada
left a comment
There was a problem hiding this comment.
reviewed the uffd pager slice — architecture looks solid (separate pager process, opt-in file backend, versioned systemd + drain). left a few nits on docs, restore cleanup, cache key wording, and pager vs session health. nice work.
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.
Reviewed by Cursor Bugbot for commit 6fb4e46. Configure here.

Summary
Tests
Note
High Risk
Changes Firecracker snapshot restore and host VM memory handling, depends on a correctly installed/versioned systemd pager, and misconfiguration or pager failure can leave restored VMs unhealthy until recycled.
Overview
Adds an opt-in Firecracker UFFD snapshot memory backend (
hypervisor.firecracker_snapshot_memory_backend=uffd, defaultfile) with a bounded shared page cache (hypervisor.firecracker_uffd_cache_max_bytes).On Linux, enabling UFFD starts a versioned
hypeman-uffd-pagervia thehypeman-uffd@<version>.servicesystemd template; Hypeman wires the Firecracker starter to create per-restore pager sessions and passes amem_backendof typeUffd(per-session socket) instead of mmap’ing the snapshotmemoryfile. Instance metadata tracks session/cache keys, restores go through newRestoreOptions, and stop/delete/standby/restore failure paths close UFFD sessions; state queries can mark instances unknown if the pager is unhealthy.Also ships the pager in build/release/install (
cmd/uffd-pager, Makefile, GoReleaser, install scripts) and adds CIscripts/check-uffd-version.shso runtime pager changes require bumpinglib/uffdpager/VERSION.Reviewed by Cursor Bugbot for commit 6fb4e46. Bugbot is set up for automated code reviews on this repo. Configure here.