From: Peter Xu <peterx@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Laurent Vivier <lvivier@redhat.com>,
qemu-devel@nongnu.org,
"Dr . David Alan Gilbert" <dgilbert@redhat.com>,
Juan Quintela <quintela@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 00/11] kvm/migration: support KVM_CLEAR_DIRTY_LOG
Date: Thu, 9 May 2019 10:33:19 +0800 [thread overview]
Message-ID: <20190509023319.GG18465@xz-x1> (raw)
In-Reply-To: <a32b877c-1303-f378-316b-c564a8ccc419@redhat.com>
On Wed, May 08, 2019 at 01:55:07PM +0200, Paolo Bonzini wrote:
> On 08/05/19 06:39, Peter Xu wrote:
> >> The disadvantage of this is that you won't clear in the kernel those
> >> dirty bits that come from other sources (e.g. vhost or
> >> address_space_map). This can lead to double-copying of pages.
> >>
> >> Migration already makes a local copy in rb->bmap, and
> >> memory_region_snapshot_and_clear_dirty can also do the clear. Would it
> >> be possible to invoke the clear using rb->bmap instead of the KVMSlot's
> >> new bitmap?
> >
> > Actually that's what I did in the first version before I post the work
> > but I noticed that there seems to have a race condition with the
> > design. The problem is we have multiple copies of the same dirty
> > bitmap from KVM and the race can happen with those multiple users
> > (bitmaps of the users can be a merged version containing KVM and other
> > sources like vhost, address_space_map, etc. but let's just make it
> > simpler to not have them yet).
>
> I see now. And in fact the same double-copying inefficiency happens
> already without this series, so you are improving the situation anyway.
>
> Have you done any kind of benchmarking already?
Not yet. I posted the series for some initial reviews first before
moving on with performance tests.
My plan of the test scenario could be:
- find a guest with relatively large memory (I would guess it is
better to have memory like 64G or even more to make some big
difference)
- run random dirty memory workload upon most of the mem, with dirty
rate X Bps.
- setup the migration bandwidth to Y Bps (Y should be bigger than X
but not that big. One could be X=800M and Y=1G to emulate 10G nic
with a workload that we can still converge with precopy only) and
start precopy migration.
- measure total migration time with CLEAR_LOG on & off. We should
expect the guest to have these with CLEAR_LOG: (1) not hang during
log_sync, and (2) migration should complete faster.
Does above test plan makes sense?
If both the QEMU/KVM changes looks ok in general, I can at least try
this on some smaller guests (I can manage ~10G mem guests with my own
hosts, but I can also try to find some bigger ones).
Thanks,
--
Peter Xu
next prev parent reply other threads:[~2019-05-09 2:34 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-08 6:15 [Qemu-devel] [PATCH 00/11] kvm/migration: support KVM_CLEAR_DIRTY_LOG Peter Xu
2019-05-08 6:15 ` [Qemu-devel] [PATCH 01/11] migration: No need to take rcu during sync_dirty_bitmap Peter Xu
2019-05-08 10:09 ` Paolo Bonzini
2019-05-08 6:15 ` [Qemu-devel] [PATCH 02/11] memory: Remove memory_region_get_dirty() Peter Xu
2019-05-08 10:09 ` Paolo Bonzini
2019-05-08 6:15 ` [Qemu-devel] [PATCH 03/11] memory: Don't set migration bitmap when without migration Peter Xu
2019-05-08 10:09 ` Paolo Bonzini
2019-05-08 6:15 ` [Qemu-devel] [PATCH 04/11] bitmap: Add bitmap_copy_with_{src|dst}_offset() Peter Xu
2019-05-08 6:15 ` [Qemu-devel] [PATCH 05/11] memory: Pass mr into snapshot_and_clear_dirty Peter Xu
2019-05-08 6:15 ` [Qemu-devel] [PATCH 06/11] memory: Introduce memory listener hook log_clear() Peter Xu
2019-05-08 6:15 ` [Qemu-devel] [PATCH 07/11] kvm: Update comments for sync_dirty_bitmap Peter Xu
2019-05-08 6:15 ` [Qemu-devel] [PATCH 08/11] kvm: Persistent per kvmslot dirty bitmap Peter Xu
2019-05-08 6:15 ` [Qemu-devel] [PATCH 09/11] kvm: Introduce slots lock for memory listener Peter Xu
2019-05-08 6:15 ` [Qemu-devel] [PATCH 10/11] kvm: Support KVM_CLEAR_DIRTY_LOG Peter Xu
2019-05-08 6:15 ` [Qemu-devel] [PATCH 11/11] migration: Split log_clear() into smaller chunks Peter Xu
2019-05-08 10:09 ` [Qemu-devel] [PATCH 00/11] kvm/migration: support KVM_CLEAR_DIRTY_LOG Paolo Bonzini
2019-05-08 11:39 ` Peter Xu
2019-05-08 11:55 ` Paolo Bonzini
2019-05-09 2:33 ` Peter Xu [this message]
2019-05-16 9:26 ` Peter Xu
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=20190509023319.GG18465@xz-x1 \
--to=peterx@redhat.com \
--cc=dgilbert@redhat.com \
--cc=lvivier@redhat.com \
--cc=pbonzini@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).