On 24.02.2021 19:54, David Hildenbrand wrote:
Anyhow I'm quite sure that adding global MISSING handler for snapshotting
is too heavy and not really needed.
UFFDIO_ZEROCOPY installs a zero pfn and that should be all of it.  There'll definitely be overhead, but it may not be that huge as imagined.  Live snapshot is great in that we have point-in-time image of guest without stopping the
guest, so taking slightly longer time won't be a huge loss to us too.

Actually we can also think of other ways to work around it. One way is we can pre-fault all guest pages before wr-protect.  Note that we don't need to write to the guest page because read would suffice, since uffd-wp would also work with zero pfn.  It's just that this workaround won't help on saving snapshot
disk space, but it seems working.  It would be great if you have other
workarounds, maybe as you said UFFDIO_ZEROCOPY is not the only route.

Thanks,

Just to add: one of the good options is too keep track of virtio-baloon discarded pages and
pre-fault them before migration starts. What do you think?

Just pre-fault everything and inhibit the balloon. That should work.

Yep.

--
Andrey Gruzdev, Principal Engineer
Virtuozzo GmbH  +7-903-247-6397
                virtuzzo.com


Reply via email to