Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1349797
| From | "Li, Liang Z" <liang.z.li@intel.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [Qemu-devel] [RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage |
| Date | 2016-03-04 03:50 +0100 |
| Message-ID | <r8NYt-8lM-3@gated-at.bofh.it> (permalink) |
| References | <r8z97-5Rb-3@gated-at.bofh.it> <r8z97-5Rb-1@gated-at.bofh.it> <r8ARA-7b8-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> On Thu, Mar 03, 2016 at 06:44:28PM +0800, Liang Li wrote:
> > Get the free pages information through virtio and filter out the free
> > pages in the ram bulk stage. This can significantly reduce the total
> > live migration time as well as network traffic.
> >
> > Signed-off-by: Liang Li <liang.z.li@intel.com>
> > ---
> > migration/ram.c | 52
> > ++++++++++++++++++++++++++++++++++++++++++++++------
> > 1 file changed, 46 insertions(+), 6 deletions(-)
>
> > @@ -1945,6 +1971,20 @@ static int ram_save_setup(QEMUFile *f, void
> *opaque)
> > DIRTY_MEMORY_MIGRATION);
> > }
> > memory_global_dirty_log_start();
> > +
> > + if (balloon_free_pages_support() &&
> > + balloon_get_free_pages(migration_bitmap_rcu->free_pages_bmap,
> > + &free_pages_count) == 0) {
> > + qemu_mutex_unlock_iothread();
> > + while (balloon_get_free_pages(migration_bitmap_rcu-
> >free_pages_bmap,
> > + &free_pages_count) == 0) {
> > + usleep(1000);
> > + }
> > + qemu_mutex_lock_iothread();
> > +
> > + filter_out_guest_free_pages(migration_bitmap_rcu-
> >free_pages_bmap);
> > + }
>
> IIUC, this code is synchronous wrt to the guest OS balloon drive. ie it is asking
> the geust for free pages and waiting for a response. If the guest OS has
> crashed this is going to mean QEMU waits forever and thus migration won't
> complete. Similarly you need to consider that the guest OS may be malicious
> and simply never respond.
>
> So if the migration code is going to use the guest balloon driver to get info
> about free pages it has to be done in an asynchronous manner so that
> migration can never be stalled by a slow/crashed/malicious guest driver.
>
> Regards,
> Daniel
Really, thanks a lot!
Liang
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage Liang Li <liang.z.li@intel.com> - 2016-03-03 12:00 +0100
Re: [RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage Cornelia Huck <cornelia.huck@de.ibm.com> - 2016-03-03 13:20 +0100
RE: [RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage "Li, Liang Z" <liang.z.li@intel.com> - 2016-03-04 03:40 +0100
Re: [Qemu-devel] [RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage "Daniel P. Berrange" <berrange@redhat.com> - 2016-03-03 13:50 +0100
RE: [Qemu-devel] [RFC qemu 4/4] migration: filter out guest's free pages in ram bulk stage "Li, Liang Z" <liang.z.li@intel.com> - 2016-03-04 03:50 +0100
csiph-web