From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934966AbcJ0AvT convert rfc822-to-8bit (ORCPT ); Wed, 26 Oct 2016 20:51:19 -0400 Received: from mga09.intel.com ([134.134.136.24]:45169 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932388AbcJ0AvR (ORCPT ); Wed, 26 Oct 2016 20:51:17 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,551,1473145200"; d="scan'208";a="24509546" From: "Li, Liang Z" To: "Hansen, Dave" , "mst@redhat.com" CC: "linux-kernel@vger.kernel.org" , "virtualization@lists.linux-foundation.org" , "linux-mm@kvack.org" , "virtio-dev@lists.oasis-open.org" , "kvm@vger.kernel.org" , "qemu-devel@nongnu.org" , "quintela@redhat.com" , "dgilbert@redhat.com" , "pbonzini@redhat.com" , "cornelia.huck@de.ibm.com" , "amit.shah@redhat.com" Subject: RE: [RESEND PATCH v3 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration Thread-Topic: [RESEND PATCH v3 kernel 0/7] Extend virtio-balloon for fast (de)inflating & fast live migration Thread-Index: AQHSK2WJC1hKfNkP2EaN2boMpmMvBaCyo0uAgAfeEICAAApwgIAA8aJg Date: Thu, 27 Oct 2016 00:51:13 +0000 Message-ID: References: <1477031080-12616-1-git-send-email-liang.z.li@intel.com> <580A4F81.60201@intel.com> <5810F1C7.4060807@intel.com> In-Reply-To: <5810F1C7.4060807@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMzBkYTE0Y2EtMWY1MC00NzZmLTk0ZWMtZjA4ZmYyZmNkYWIwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IjdTcm9zZzA4c09KS3FoVE41cUppSUFNbVZwVVdIRU5QeThncTg0a1V0NEE9In0= 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 > On 10/26/2016 03:06 AM, Li, Liang Z wrote: > > I am working on Dave's new bitmap schema, I have finished the part of > > getting the 'hybrid scheme bitmap' and found the complexity was more > > than I expected. The main issue is more memory is required to save the > > 'hybrid scheme bitmap' beside that used to save the raw page bitmap, > > for the worst case, the memory required is 3 times than that in the > > previous implementation. > > Really? Could you please describe the scenario where this occurs? > > I am wondering if I should continue, as an alternative solution, how > > about using PFNs array when inflating/deflating only a few pages? > > Things will be much more simple. > > Yes, using pfn lists is more efficient than using bitmaps for sparse bitmaps. > Yes, there will be cases where it is preferable to just use pfn lists vs. any kind > of bitmap. > > But, what does it matter? At least with your current scheme where we go > out and collect get_unused_pages(), we do the allocation up front. The > space efficiency doesn't matter at all for small sizes since we do the constant- > size allocation *anyway*. > > I'm also pretty sure you can pack the pfn and page order into a single 64-bit > word and have no bitmap for a given record. That would make it pack just as > well as the old pfns alone. Right? Yes, thanks for reminding, I am using 128 bit now, I will change it to 64 bit. Let me finish the v4 first. Thanks! Liang