qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v13 0/5] UFFD write-tracking migration/snapshots


From: Andrey Gruzdev
Subject: Re: [PATCH v13 0/5] UFFD write-tracking migration/snapshots
Date: Wed, 24 Feb 2021 20:52:03 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 24.02.2021 20:01, David Hildenbrand wrote:
On 24.02.21 17:56, Andrey Gruzdev wrote:
On 22.02.2021 21:11, David Hildenbrand wrote:
On 22.02.21 18:54, Peter Xu wrote:
On Mon, Feb 22, 2021 at 06:33:27PM +0100, David Hildenbrand wrote:
On 22.02.21 18:29, Peter Xu wrote:
On Sat, Feb 20, 2021 at 02:59:42AM -0500, David Hildenbrand wrote:
Live snapshotting ends up reading all guest memory (dirty bitmap
starts with all 1s), which is not what we want for virtio-mem - we
don’t want to read and migrate memory that has been discarded and
has no stable content.

For ordinary migration we use the guest page hint API to clear
bits in the dirty bitmap after dirty bitmap sync. Well, if we
don‘t do bitmap syncs we‘ll never clear any dirty bits. That‘s the
problem.

Using dirty bitmap for that information is less efficient, becase it's
definitely a larger granularity information than PAGE_SIZE. If the
disgarded
ranges are always continuous and at the end of a memory region, we
should have
some parameter in the ramblock showing that where we got shrinked
then we don't
check dirty bitmap at all, rather than always assuming used_length
is the one.

They are randomly scattered across the whole RAMBlock.
Shrinking/growing
will be done to some degree in the future (but it won't get rid of the
general sparse layout we can produce).

OK. Btw I think currently live snapshot should still be reading dirty
bitmap,
so maybe it's still fine.  It's just that it's still not very clear
to hide
virtio-mem information into dirty bitmap, imho, since that's not how we
interpret dirty bitmap - which is only for the sake of tracking page
changes.

Well, currently it is "what do we have to migrate".

Using dirty bitmap can prohibit unexpected (overwritten) content of
pre-discarded pages, but they'll appear as zeroed on destination.

To be precise, they'll usually appear as discarded (no pages in the migration stream).

I just mean the retained content of the page after population - zeroes.


What about other virtio-baloon features like HW_POISON when poisoned
pages should also be retained on population filled with certain pattern?

In case of free page reporting, we skip discarding if poisoning is set to != 0 because of that reason:

if (virtio_balloon_inhibited() || dev->poison_val) {
    goto skip_element;
}

Got it, thanks.

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]