linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] Fast balloon & fast live migration
@ 2016-06-13  9:47 Liang Li
  2016-06-13  9:47 ` [PATCH 1/6] virtio-balloon: rework deflate to add page to a list Liang Li
                   ` (6 more replies)
  0 siblings, 7 replies; 13+ messages in thread
From: Liang Li @ 2016-06-13  9:47 UTC (permalink / raw)
  To: kvm; +Cc: virtio-dev, qemu-devel, linux-kernel, mst, Liang Li

The implementation of the current virtio-balloon is not very
efficient, bellow is test result of time spends on inflating
the balloon to 3GB of a 4GB idle guest:

a. allocating pages (6.5%, 103ms)
b. sending PFNs to host (68.3%, 787ms)
c. address translation (6.1%, 96ms)
d. madvise (19%, 300ms)

It takes about 1577ms for the whole inflating process to complete.
The test shows that the bottle neck is the stage b and stage d.

If using a bitmap to send the page info instead of the PFNs, we
can reduce the overhead in stage b quite a lot. Furthermore, it's
possible to do the address translation and the madvise with a bulk
of pages, instead of the current page per page way, so the overhead
of stage c and stage d can also be reduced a lot.

In addition, we can speed up live migration by skipping process
guest's free pages.

Patch 1 and patch 2 are the kernel side implementation which are
intended to speed up the inflating & deflating process by adding a
new feature to the virtio-balloon device. And now, inflating the
balloon to 3GB of a 4GB idle guest only takes 200ms, it's about 8
times as fast as before.


Patch 3 and patch 4 add the cache drop support, now hypervisor can
request the guest to drop it's cache. It's useful before inflating
the virtio-balloon and before starting live migration.

Patch 5 and patch 6 save guest's free page information into a page
bitmap and send the bitmap to host through balloon's virt queue. 

Liang Li (6):
  virtio-balloon: rework deflate to add page to a list
  virtio-balloon: speed up inflate/deflate process
  mm:split the drop cache operation into a function
  virtio-balloon: add drop cache support
  mm: add the related functions to get free page info
  virtio-balloon: tell host vm's free page info

 drivers/virtio/virtio_balloon.c     | 321 +++++++++++++++++++++++++++++++-----
 fs/drop_caches.c                    |  22 ++-
 include/linux/mm.h                  |   1 +
 include/uapi/linux/virtio_balloon.h |   2 +
 mm/page_alloc.c                     |  40 +++++
 5 files changed, 339 insertions(+), 47 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2016-06-24  6:28 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-13  9:47 [PATCH 0/6] Fast balloon & fast live migration Liang Li
2016-06-13  9:47 ` [PATCH 1/6] virtio-balloon: rework deflate to add page to a list Liang Li
2016-06-23  8:25   ` Li, Liang Z
2016-06-23  8:30   ` Li, Liang Z
2016-06-13  9:47 ` [PATCH 2/6] virtio-balloon: speed up inflate/deflate process Liang Li
2016-06-13 10:17   ` kbuild test robot
2016-06-24  5:39   ` Michael S. Tsirkin
2016-06-24  6:28     ` Li, Liang Z
2016-06-13  9:47 ` [PATCH 3/6] mm:split the drop cache operation into a function Liang Li
2016-06-13  9:47 ` [PATCH 4/6] virtio-balloon: add drop cache support Liang Li
2016-06-13  9:47 ` [PATCH 5/6] mm: add the related functions to get free page info Liang Li
2016-06-13  9:47 ` [PATCH 6/6] virtio-balloon: tell host vm's " Liang Li
2016-06-23  8:27 ` [PATCH 0/6] Fast balloon & fast live migration Li, Liang Z

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).