From: David Hildenbrand <david@redhat.com>
To: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
Cc: Juan Quintela <quintela@redhat.com>,
Andrey Gruzdev <andrey.gruzdev@virtuozzo.com>,
qemu-devel@nongnu.org, Peter Xu <peterx@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH RFC] migrate/ram: remove "ram_bulk_stage" and "fpo_enabled"
Date: Tue, 11 May 2021 10:21:44 +0200 [thread overview]
Message-ID: <4d077bc3-9408-84c6-e753-e37f049ec34a@redhat.com> (raw)
In-Reply-To: <YJmCR2N0KzZ9wvVx@work-vm>
On 10.05.21 20:58, Dr. David Alan Gilbert wrote:
> * David Hildenbrand (david@redhat.com) wrote:
>> The bulk stage is kind of weird: migration_bitmap_find_dirty() will
>> indicate a dirty page, however, ram_save_host_page() will never save it, as
>> migration_bitmap_clear_dirty() detects that it is not dirty.
>>
>> We already fill the bitmap in ram_list_init_bitmaps() with ones, marking
>> everything dirty - it didn't used to be that way, which is why we needed
>> an explicit first bulk stage.
>>
>> Let's simplify: make the bitmap the single source of thuth. Explicitly
>> handle the "xbzrle_enabled after first round" case.
>
> I think you're right here, so (at long last) queued.
Thanks!
> I did read the comments on 6eeb63f which added the FPO flag, and I still
> think you're right.
>
>> Regarding XBZRLE (implicitly handled via "ram_bulk_stage = false" right
>> now), there is now a slight change in behavior:
>> - Colo: When starting, it will be disabled (was implicitly enabled)
>> until the first round actually finishes.
>
> Was it or did they see a bulk stage again?
static void colo_init_ram_state(void)
{
ram_state_init(&ram_state);
- ram_state->ram_bulk_stage = false;
}
suggests that they wanted to things out of order (or at least onsider
the bitmap with eventual holes) right away, which implicitly unlocked
xbzrle. Not sure if that behavior was really intended (don't think so).
> I can imagine that XBZRLE might be useful for COLO if subsequent rounds
> of synchornisation finds pages that change but not much.
Right, I assume in the first round they don't really care.
>
>> - Free page hinting: When starting, XBZRLE will be disabled (was implicitly
>> enabled) until the first round actually finished.
>
> But the XBZRLE cache would be empty anyway on that first round?
Yes; it's less of a concern just something that changed (most probably
to the good :) ).
>
>> - Snapshots: When starting, XBZRLE will be disabled. We essentially only
>> do a single run, so I guess it will never actually get disabled.
>>
>> Postcopy seems to indirectly disable it in ram_save_page(), so there
>> shouldn't be really any change.
>>
>> Cc: "Michael S. Tsirkin" <mst@redhat.com>
>> Cc: Juan Quintela <quintela@redhat.com>
>> Cc: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
>> Cc: Andrey Gruzdev <andrey.gruzdev@virtuozzo.com>
>> Cc: Peter Xu <peterx@redhat.com>
>> Signed-off-by: David Hildenbrand <david@redhat.com>
>> ---
>>
>> Our dirty bitmap handling is right now a little confusing due to the bulk
>> stage. Am i missing something important? Can someone comment on the
>> expected XBZRLE handling? It all is a little bit too intertwined for my
>> taste.
>
> I think it's mostly due to there being no benefit (and a lot of cost) in
> doing xbzrle during the first round.
That makes sense, thanks!
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2021-05-11 8:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-16 10:50 [PATCH RFC] migrate/ram: remove "ram_bulk_stage" and "fpo_enabled" David Hildenbrand
2021-03-05 9:43 ` David Hildenbrand
2021-05-10 18:58 ` Dr. David Alan Gilbert
2021-05-11 8:21 ` David Hildenbrand [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4d077bc3-9408-84c6-e753-e37f049ec34a@redhat.com \
--to=david@redhat.com \
--cc=andrey.gruzdev@virtuozzo.com \
--cc=dgilbert@redhat.com \
--cc=mst@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).