From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Yang Hongyang <yanghongyang@huawei.com>
Cc: quintela@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC] Split migration bitmaps by ramblock
Date: Tue, 28 Mar 2017 19:52:25 +0100 [thread overview]
Message-ID: <20170328185224.GI5740@work-vm> (raw)
In-Reply-To: <31202c71-ced1-3cdd-e1a1-829daf5d2819@huawei.com>
* Yang Hongyang (yanghongyang@huawei.com) wrote:
>
>
> On 2017/3/24 16:34, Juan Quintela wrote:
> > Yang Hongyang <yanghongyang@huawei.com> wrote:
> >> Hi Juan,
> >>
> >> First of all, I like the refactor patchset about RAMState, it makes
> >> things clean, great!
> >
> > Thanks.
> >
> > The whole idea of the series was to make testing changes easier.
> >
> >> On 2017/3/24 5:01, Juan Quintela wrote:
> >>> Hi
> >>>
> >>> This series split the migration and unsent bitmaps by ramblock. This
> >>> makes it easier to synchronize in small bits. This is on top of the
> >>> RAMState and not-hotplug series.
> >>>
> >>> Why?
> >>>
> >>> reason 1:
> >>>
> >>> People have complained that by the time that we detect that a page is
> >>> sent, it has already been marked dirty "again" inside kvm, so we are
> >>> going to send it again. On top of this patch, my idea is, for words
> >>> of the bitmap that have any bit set, just synchonize the bitmap before
> >>> sending the pages. I have not looking into performance numbers yet,
> >>> jsut asking for comments about how it is done.
> >>
> >> Here you said 'synchonize the bitmap before sending the pages', do you
> >> mean synchronize the bitmap from kvm? If so, I doubt the performance...
> >> because every synchronization will require a ioctl(). If not, the
> >> synchronization of per block is useless.
> >>
> >> Currently, migration thread will synchronize the bitmap from kvm every
> >> iter(migration_bitmap_sync()). The RAMBlock already has kind of per block
> >> bitmap for this kind of sync. And the migration bitmap is used to put all
> >> those per block bitmap together for data sending use.
> >
> > Hi
> > For huge memory machines, we are doing it always in one go.
> >
> >
> > bitmap_sync(1TB RAM)
> > walk bitmap for 512MB of RAM, at that point, it is very probable that
> > this page is again dirty in the KVM bitmap, so, we send it, but as it is
> > dirty again, we would have to send it in the next pass. This sent is
> > completely useless.
>
> I got your point, the problem is KVM do not have the ability to sync in
> small chunks currently, even it has, it will generate lots of ioctls:
> KVM bitmap sync is per Memory Region IIRC, think we have a 1T mem
> guest, 16 MRs for example, currently, every iter we need to do 16 ioctls.
> But if we sync in small chunks, 64M for example, we might need to do
> 16384 ioctls in the worst case. eg:mem press(dirty rate) is very high.
Yes but I think people have suggested it should have that ability for a long
time; so hopefully we can add it.
I'd assumed the sizes of these chunks would be a bit bigger, a few GB each maybe
and also assumed we'd have a separate thread that was doing the syncing from
a different thread to the one doing the writing, trying to keep ahead of the
write pointer.
Even with the structure Juan has here, we could get to syncing each NUMA
node separately like that which would kind of makes some sense.
Dave
>
> >
> > So my idea is to split things in smaller chunks. As we have to do an
> > ioctl, we wouldn't want to synchronize page by page, but perhaps 16MB at
> > a time, 64MB, anything less than the whole amount of memory.
> >
> > Later, Juan.
> >
>
> --
> Thanks,
> Yang
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2017-03-28 18:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-23 21:01 [Qemu-devel] [RFC] Split migration bitmaps by ramblock Juan Quintela
2017-03-23 21:01 ` [Qemu-devel] [PATCH] ram: Split dirty bitmap by RAMBlock Juan Quintela
2017-03-24 1:57 ` [Qemu-devel] [RFC] Split migration bitmaps by ramblock Yang Hongyang
2017-03-24 8:34 ` Juan Quintela
2017-03-24 9:23 ` Yang Hongyang
2017-03-28 18:52 ` Dr. David Alan Gilbert [this message]
2017-03-28 19:05 ` Dr. David Alan Gilbert
2017-03-29 8:51 ` Juan Quintela
2017-03-31 17:50 ` Dr. David Alan Gilbert
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=20170328185224.GI5740@work-vm \
--to=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=yanghongyang@huawei.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).