All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liang Li <liang.z.li@intel.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, pbonzini@redhat.com, quintela@redhat.com,
	amit.shah@redhat.com, kvm@vger.kernel.org, dgilbert@redhat.com,
	thuth@redhat.com, virtio-dev@lists.oasis-open.org,
	dave.hansen@intel.com, Liang Li <liang.z.li@intel.com>
Subject: [PATCH qemu v3 0/6] Fast (de)inflating & fast live migration
Date: Fri, 21 Oct 2016 14:48:18 +0800	[thread overview]
Message-ID: <1477032504-12745-1-git-send-email-liang.z.li@intel.com> (raw)

This patch set intends to do two optimizations, one is to speed up
the (de)inflating process of virtio balloon, and another one which
is to speed up the live migration process. We put them together
because both of them are required to change the virtio balloon spec.
 
The main idea of speeding up the (de)inflating process is to use
bitmap to send the page information to host instead of the PFNs, to
reduce the overhead of virtio data transmission, address translation
and madvise(). This can help to improve the performance by about 85%.
 
The idea of speeding up live migration is to skip process guest's
free pages in the first round of data copy, to reduce needless
data processing, this can help to save quite a lot of CPU cycles and
network bandwidth. We get guest's free page information through the
virt queue of virtio-balloon, and filter out these free pages during
live migration. For an idle 8GB guest, this can help to shorten the
total live migration time from 2Sec to about 500ms in the 10Gbps
network environment.
 
Changes from v2 to v3:
    * Merged two patches for kernel head file updating into one 
    * Removed one patch which was unrelated with this feature 
    * Removed the patch to migrate the vq elem, use a new way instead

Changes from v1 to v2:
    * Abandon the patch for dropping page cache.
    * Get a struct from vq instead of separate variables.
    * Use two separate APIs to request free pages and query the status.
    * Changed the virtio balloon interface.
    * Addressed some of the comments of v1.

Liang Li (6):
  virtio-balloon: update linux head file
  virtio-balloon: speed up inflating & deflating process
  balloon: get free page info from guest
  bitmap: Add a new bitmap_move function
  kvm: Add two new arch specific functions
  migration: skip free pages during live migration

 balloon.c                                       |  47 +++-
 hw/virtio/virtio-balloon.c                      | 273 ++++++++++++++++++++++--
 include/hw/virtio/virtio-balloon.h              |  18 +-
 include/qemu/bitmap.h                           |  13 ++
 include/standard-headers/linux/virtio_balloon.h |  41 ++++
 include/sysemu/balloon.h                        |  18 +-
 include/sysemu/kvm.h                            |  18 ++
 migration/ram.c                                 |  86 ++++++++
 target-arm/kvm.c                                |  14 ++
 target-i386/kvm.c                               |  37 ++++
 target-mips/kvm.c                               |  14 ++
 target-ppc/kvm.c                                |  14 ++
 target-s390x/kvm.c                              |  14 ++
 13 files changed, 581 insertions(+), 26 deletions(-)

-- 
1.8.3.1


WARNING: multiple messages have this Message-ID (diff)
From: Liang Li <liang.z.li@intel.com>
To: qemu-devel@nongnu.org
Cc: mst@redhat.com, pbonzini@redhat.com, quintela@redhat.com,
	amit.shah@redhat.com, kvm@vger.kernel.org, dgilbert@redhat.com,
	thuth@redhat.com, virtio-dev@lists.oasis-open.org,
	dave.hansen@intel.com, Liang Li <liang.z.li@intel.com>
Subject: [Qemu-devel] [PATCH qemu v3 0/6] Fast (de)inflating & fast live migration
Date: Fri, 21 Oct 2016 14:48:18 +0800	[thread overview]
Message-ID: <1477032504-12745-1-git-send-email-liang.z.li@intel.com> (raw)

This patch set intends to do two optimizations, one is to speed up
the (de)inflating process of virtio balloon, and another one which
is to speed up the live migration process. We put them together
because both of them are required to change the virtio balloon spec.
 
The main idea of speeding up the (de)inflating process is to use
bitmap to send the page information to host instead of the PFNs, to
reduce the overhead of virtio data transmission, address translation
and madvise(). This can help to improve the performance by about 85%.
 
The idea of speeding up live migration is to skip process guest's
free pages in the first round of data copy, to reduce needless
data processing, this can help to save quite a lot of CPU cycles and
network bandwidth. We get guest's free page information through the
virt queue of virtio-balloon, and filter out these free pages during
live migration. For an idle 8GB guest, this can help to shorten the
total live migration time from 2Sec to about 500ms in the 10Gbps
network environment.
 
Changes from v2 to v3:
    * Merged two patches for kernel head file updating into one 
    * Removed one patch which was unrelated with this feature 
    * Removed the patch to migrate the vq elem, use a new way instead

Changes from v1 to v2:
    * Abandon the patch for dropping page cache.
    * Get a struct from vq instead of separate variables.
    * Use two separate APIs to request free pages and query the status.
    * Changed the virtio balloon interface.
    * Addressed some of the comments of v1.

Liang Li (6):
  virtio-balloon: update linux head file
  virtio-balloon: speed up inflating & deflating process
  balloon: get free page info from guest
  bitmap: Add a new bitmap_move function
  kvm: Add two new arch specific functions
  migration: skip free pages during live migration

 balloon.c                                       |  47 +++-
 hw/virtio/virtio-balloon.c                      | 273 ++++++++++++++++++++++--
 include/hw/virtio/virtio-balloon.h              |  18 +-
 include/qemu/bitmap.h                           |  13 ++
 include/standard-headers/linux/virtio_balloon.h |  41 ++++
 include/sysemu/balloon.h                        |  18 +-
 include/sysemu/kvm.h                            |  18 ++
 migration/ram.c                                 |  86 ++++++++
 target-arm/kvm.c                                |  14 ++
 target-i386/kvm.c                               |  37 ++++
 target-mips/kvm.c                               |  14 ++
 target-ppc/kvm.c                                |  14 ++
 target-s390x/kvm.c                              |  14 ++
 13 files changed, 581 insertions(+), 26 deletions(-)

-- 
1.8.3.1

             reply	other threads:[~2016-10-21  7:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21  6:48 Liang Li [this message]
2016-10-21  6:48 ` [Qemu-devel] [PATCH qemu v3 0/6] Fast (de)inflating & fast live migration Liang Li
2016-10-21  6:48 ` [PATCH qemu v3 1/6] virtio-balloon: update linux head file Liang Li
2016-10-21  6:48   ` [Qemu-devel] " Liang Li
2016-10-21  6:48 ` [PATCH qemu v3 2/6] virtio-balloon: speed up inflating & deflating process Liang Li
2016-10-21  6:48   ` [Qemu-devel] " Liang Li
2016-10-21  6:48 ` [PATCH qemu v3 3/6] balloon: get free page info from guest Liang Li
2016-10-21  6:48   ` [Qemu-devel] " Liang Li
2016-10-21  6:48 ` [PATCH qemu v3 4/6] bitmap: Add a new bitmap_move function Liang Li
2016-10-21  6:48   ` [Qemu-devel] " Liang Li
2016-10-21  6:48 ` [PATCH qemu v3 5/6] kvm: Add two new arch specific functions Liang Li
2016-10-21  6:48   ` [Qemu-devel] " Liang Li
2016-10-21  6:48 ` [PATCH qemu v3 6/6] migration: skip free pages during live migration Liang Li
2016-10-21  6:48   ` [Qemu-devel] " Liang Li
2016-10-21  7:19 ` [Qemu-devel] [PATCH qemu v3 0/6] Fast (de)inflating & fast " no-reply
2016-10-21  7:19   ` no-reply
2016-10-21  7:22 ` no-reply
2016-10-21  7:22   ` no-reply
2016-10-30 22:05 ` Michael S. Tsirkin
2016-10-30 22:05   ` [Qemu-devel] " Michael S. Tsirkin

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=1477032504-12745-1-git-send-email-liang.z.li@intel.com \
    --to=liang.z.li@intel.com \
    --cc=amit.shah@redhat.com \
    --cc=dave.hansen@intel.com \
    --cc=dgilbert@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=thuth@redhat.com \
    --cc=virtio-dev@lists.oasis-open.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.