mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
Userfaultfd is a great mechanism for providing fast restore to Cloud Hypervisor VMs. But that means the price to pay for bringing pages in happens at runtime, which might slow down the guest when it's touching pages which haven't been brought in yet. By prefaulting the pages in the background, we're trying to get the best of both worlds. That means we still get a very fast restore with the uffd handler, but within a few seconds (depending on VM's RAM size), we also get the pages fully faulted and we can stop the uffd handler thread at that point. Signed-off-by: Sebastien Boeuf <sboeuf@meta.com> Assisted-by: Claude:claude-opus-4-7