lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1465811233-21136-1-git-send-email-liang.z.li@intel.com>
Date:	Mon, 13 Jun 2016 17:47:07 +0800
From:	Liang Li <liang.z.li@...el.com>
To:	kvm@...r.kernel.org
Cc:	virtio-dev@...ts.oasis-open.org, qemu-devel@...gun.org,
	linux-kernel@...r.kernel.org, mst@...hat.com,
	Liang Li <liang.z.li@...el.com>
Subject: [PATCH 0/6] Fast balloon & fast live migration

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ