Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1420673 > unrolled thread
| Started by | Liang Li <liang.z.li@intel.com> |
|---|---|
| First post | 2016-06-13 12:00 +0200 |
| Last post | 2016-06-23 10:30 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/6] Fast balloon & fast live migration Liang Li <liang.z.li@intel.com> - 2016-06-13 12:00 +0200
RE: [PATCH 0/6] Fast balloon & fast live migration "Li, Liang Z" <liang.z.li@intel.com> - 2016-06-23 10:30 +0200
| From | Liang Li <liang.z.li@intel.com> |
|---|---|
| Date | 2016-06-13 12:00 +0200 |
| Subject | [PATCH 0/6] Fast balloon & fast live migration |
| Message-ID | <rJwOZ-4vK-5@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | "Li, Liang Z" <liang.z.li@intel.com> |
|---|---|
| Date | 2016-06-23 10:30 +0200 |
| Message-ID | <rN8bo-7gE-15@gated-at.bofh.it> |
| In reply to | #1420673 |
Any comments? Liang > -----Original Message----- > From: Li, Liang Z > Sent: Monday, June 13, 2016 5:47 PM > To: kvm@vger.kernel.org > Cc: virtio-dev@lists.oasis-open.org; qemu-devel@nongun.org; linux- > kernel@vger.kernel.org; mst@redhat.com; Li, Liang Z > 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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web