From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751845AbcFWI1c (ORCPT ); Thu, 23 Jun 2016 04:27:32 -0400 Received: from mga04.intel.com ([192.55.52.120]:2796 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751063AbcFWI10 convert rfc822-to-8bit (ORCPT ); Thu, 23 Jun 2016 04:27:26 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,509,1459839600"; d="scan'208";a="1003619605" From: "Li, Liang Z" To: "kvm@vger.kernel.org" CC: "virtio-dev@lists.oasis-open.org" , "qemu-devel@nongun.org" , "linux-kernel@vger.kernel.org" , "mst@redhat.com" Subject: RE: [PATCH 0/6] Fast balloon & fast live migration Thread-Topic: [PATCH 0/6] Fast balloon & fast live migration Thread-Index: AQHRxVl1i0a72MNHcEarjxAHRoMU05/2xyjA Date: Thu, 23 Jun 2016 08:27:22 +0000 Message-ID: References: <1465811233-21136-1-git-send-email-liang.z.li@intel.com> In-Reply-To: <1465811233-21136-1-git-send-email-liang.z.li@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMjcxMmFiMzgtZDg2NS00MTBmLWFkZjItNjYzNTM4NjczMDRkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6Ind3dDZ2VG9hck1EU2pJT3FTNDVlZG00eHhaaHhMc0RBVkZQa0lzZ0NLQlk9In0= x-ctpclassification: CTP_IC x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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