From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754479AbcLQL4q convert rfc822-to-8bit (ORCPT ); Sat, 17 Dec 2016 06:56:46 -0500 Received: from mga03.intel.com ([134.134.136.65]:32449 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752619AbcLQL4o (ORCPT ); Sat, 17 Dec 2016 06:56:44 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,363,1477983600"; d="scan'208";a="1100542227" From: "Li, Liang Z" To: Andrea Arcangeli CC: "Michael S. Tsirkin" , "Hansen, Dave" , David Hildenbrand , "kvm@vger.kernel.org" , "mhocko@suse.com" , "linux-kernel@vger.kernel.org" , "qemu-devel@nongnu.org" , "linux-mm@kvack.org" , "dgilbert@redhat.com" , "pbonzini@redhat.com" , "akpm@linux-foundation.org" , "virtualization@lists.linux-foundation.org" , "kirill.shutemov@linux.intel.com" Subject: RE: [Qemu-devel] [PATCH kernel v5 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration Thread-Topic: [Qemu-devel] [PATCH kernel v5 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration Thread-Index: AQHSSufi4SQjg1m8CEK5jUmkErPNiaD6HPWAgAJj94D//6QTgIAAAOqAgAAKNYCAAAnRgIAAHEuAgAAVUACAAAl0AIAClagg//+JqQCACJvLIIABhXGAgAAFqwCAARsj0IAAc0eAgAHV+qA= Date: Sat, 17 Dec 2016 11:56:40 +0000 Message-ID: References: <20161207183817.GE28786@redhat.com> <20161207202824.GH28786@redhat.com> <060287c7-d1af-45d5-70ea-ad35d4bbeb84@intel.com> <01886693-c73e-3696-860b-086417d695e1@intel.com> <20161215173901-mutt-send-email-mst@kernel.org> <20161216154049.GB6168@redhat.com> In-Reply-To: <20161216154049.GB6168@redhat.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZThlMDhhNTktODUzZi00Mzk3LTk4NDEtYzE3MzFmZTQwMmUxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6IkZibkM1MTFmejNrRGtyR0NKTkpIK01mTWRBaEYxSHMyRk5nQTM4T25Cakk9In0= 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 Fri, Dec 16, 2016 at 01:12:21AM +0000, Li, Liang Z wrote: > > There still exist the case if the MAX_ORDER is configured to a large > > value, e.g. 36 for a system with huge amount of memory, then there is only > 28 bits left for the pfn, which is not enough. > > Not related to the balloon but how would it help to set MAX_ORDER to 36? > My point here is MAX_ORDER may be configured to a big value. > What the MAX_ORDER affects is that you won't be able to ask the kernel > page allocator for contiguous memory bigger than 1<<(MAX_ORDER-1), but > that's a driver issue not relevant to the amount of RAM. Drivers won't > suddenly start to ask the kernel allocator to allocate compound pages at > orders >= 11 just because more RAM was added. > > The higher the MAX_ORDER the slower the kernel runs simply so the smaller > the MAX_ORDER the better. > > > Should we limit the MAX_ORDER? I don't think so. > > We shouldn't strictly depend on MAX_ORDER value but it's mostly limited > already even if configurable at build time. > I didn't know that and will take a look, thanks for your information. Liang > We definitely need it to reach at least the hugepage size, then it's mostly > driver issue, but drivers requiring large contiguous allocations should rely on > CMA only or vmalloc if they only require it virtually contiguous, and not rely > on larger MAX_ORDER that would slowdown all kernel allocations/freeing. From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Li, Liang Z" Subject: RE: [Qemu-devel] [PATCH kernel v5 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration Date: Sat, 17 Dec 2016 11:56:40 +0000 Message-ID: References: <20161207183817.GE28786@redhat.com> <20161207202824.GH28786@redhat.com> <060287c7-d1af-45d5-70ea-ad35d4bbeb84@intel.com> <01886693-c73e-3696-860b-086417d695e1@intel.com> <20161215173901-mutt-send-email-mst@kernel.org> <20161216154049.GB6168@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: "mhocko@suse.com" , "kvm@vger.kernel.org" , "Michael S. Tsirkin" , "linux-kernel@vger.kernel.org" , "qemu-devel@nongnu.org" , "linux-mm@kvack.org" , "Hansen, Dave" , "kirill.shutemov@linux.intel.com" , "pbonzini@redhat.com" , "akpm@linux-foundation.org" , "virtualization@lists.linux-foundation.org" , "dgilbert@redhat.com" To: Andrea Arcangeli Return-path: In-Reply-To: <20161216154049.GB6168@redhat.com> Content-Language: en-US List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: virtualization-bounces@lists.linux-foundation.org Errors-To: virtualization-bounces@lists.linux-foundation.org List-Id: kvm.vger.kernel.org > On Fri, Dec 16, 2016 at 01:12:21AM +0000, Li, Liang Z wrote: > > There still exist the case if the MAX_ORDER is configured to a large > > value, e.g. 36 for a system with huge amount of memory, then there is only > 28 bits left for the pfn, which is not enough. > > Not related to the balloon but how would it help to set MAX_ORDER to 36? > My point here is MAX_ORDER may be configured to a big value. > What the MAX_ORDER affects is that you won't be able to ask the kernel > page allocator for contiguous memory bigger than 1<<(MAX_ORDER-1), but > that's a driver issue not relevant to the amount of RAM. Drivers won't > suddenly start to ask the kernel allocator to allocate compound pages at > orders >= 11 just because more RAM was added. > > The higher the MAX_ORDER the slower the kernel runs simply so the smaller > the MAX_ORDER the better. > > > Should we limit the MAX_ORDER? I don't think so. > > We shouldn't strictly depend on MAX_ORDER value but it's mostly limited > already even if configurable at build time. > I didn't know that and will take a look, thanks for your information. Liang > We definitely need it to reach at least the hugepage size, then it's mostly > driver issue, but drivers requiring large contiguous allocations should rely on > CMA only or vmalloc if they only require it virtually contiguous, and not rely > on larger MAX_ORDER that would slowdown all kernel allocations/freeing. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f72.google.com (mail-pg0-f72.google.com [74.125.83.72]) by kanga.kvack.org (Postfix) with ESMTP id 286F16B0261 for ; Sat, 17 Dec 2016 06:56:45 -0500 (EST) Received: by mail-pg0-f72.google.com with SMTP id g1so17721322pgn.3 for ; Sat, 17 Dec 2016 03:56:45 -0800 (PST) Received: from mga01.intel.com (mga01.intel.com. [192.55.52.88]) by mx.google.com with ESMTPS id z21si12258029pgi.50.2016.12.17.03.56.43 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 Dec 2016 03:56:44 -0800 (PST) From: "Li, Liang Z" Subject: RE: [Qemu-devel] [PATCH kernel v5 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration Date: Sat, 17 Dec 2016 11:56:40 +0000 Message-ID: References: <20161207183817.GE28786@redhat.com> <20161207202824.GH28786@redhat.com> <060287c7-d1af-45d5-70ea-ad35d4bbeb84@intel.com> <01886693-c73e-3696-860b-086417d695e1@intel.com> <20161215173901-mutt-send-email-mst@kernel.org> <20161216154049.GB6168@redhat.com> In-Reply-To: <20161216154049.GB6168@redhat.com> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Sender: owner-linux-mm@kvack.org List-ID: To: Andrea Arcangeli Cc: "Michael S. Tsirkin" , "Hansen, Dave" , David Hildenbrand , "kvm@vger.kernel.org" , "mhocko@suse.com" , "linux-kernel@vger.kernel.org" , "qemu-devel@nongnu.org" , "linux-mm@kvack.org" , "dgilbert@redhat.com" , "pbonzini@redhat.com" , "akpm@linux-foundation.org" , "virtualization@lists.linux-foundation.org" , "kirill.shutemov@linux.intel.com" > On Fri, Dec 16, 2016 at 01:12:21AM +0000, Li, Liang Z wrote: > > There still exist the case if the MAX_ORDER is configured to a large > > value, e.g. 36 for a system with huge amount of memory, then there is o= nly > 28 bits left for the pfn, which is not enough. >=20 > Not related to the balloon but how would it help to set MAX_ORDER to 36? >=20 My point here is MAX_ORDER may be configured to a big value. > What the MAX_ORDER affects is that you won't be able to ask the kernel > page allocator for contiguous memory bigger than 1<<(MAX_ORDER-1), but > that's a driver issue not relevant to the amount of RAM. Drivers won't > suddenly start to ask the kernel allocator to allocate compound pages at > orders >=3D 11 just because more RAM was added. >=20 > The higher the MAX_ORDER the slower the kernel runs simply so the smaller > the MAX_ORDER the better. >=20 > > Should we limit the MAX_ORDER? I don't think so. >=20 > We shouldn't strictly depend on MAX_ORDER value but it's mostly limited > already even if configurable at build time. >=20 I didn't know that and will take a look, thanks for your information. Liang > We definitely need it to reach at least the hugepage size, then it's most= ly > driver issue, but drivers requiring large contiguous allocations should r= ely on > CMA only or vmalloc if they only require it virtually contiguous, and not= rely > on larger MAX_ORDER that would slowdown all kernel allocations/freeing. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37884) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cIDbj-0001PG-GW for qemu-devel@nongnu.org; Sat, 17 Dec 2016 06:56:56 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cIDbf-0003Kh-B9 for qemu-devel@nongnu.org; Sat, 17 Dec 2016 06:56:55 -0500 Received: from mga07.intel.com ([134.134.136.100]:27767) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cIDbf-00037g-34 for qemu-devel@nongnu.org; Sat, 17 Dec 2016 06:56:51 -0500 From: "Li, Liang Z" Date: Sat, 17 Dec 2016 11:56:40 +0000 Message-ID: References: <20161207183817.GE28786@redhat.com> <20161207202824.GH28786@redhat.com> <060287c7-d1af-45d5-70ea-ad35d4bbeb84@intel.com> <01886693-c73e-3696-860b-086417d695e1@intel.com> <20161215173901-mutt-send-email-mst@kernel.org> <20161216154049.GB6168@redhat.com> In-Reply-To: <20161216154049.GB6168@redhat.com> Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH kernel v5 0/5] Extend virtio-balloon for fast (de)inflating & fast live migration List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andrea Arcangeli Cc: "Michael S. Tsirkin" , "Hansen, Dave" , David Hildenbrand , "kvm@vger.kernel.org" , "mhocko@suse.com" , "linux-kernel@vger.kernel.org" , "qemu-devel@nongnu.org" , "linux-mm@kvack.org" , "dgilbert@redhat.com" , "pbonzini@redhat.com" , "akpm@linux-foundation.org" , "virtualization@lists.linux-foundation.org" , "kirill.shutemov@linux.intel.com" > On Fri, Dec 16, 2016 at 01:12:21AM +0000, Li, Liang Z wrote: > > There still exist the case if the MAX_ORDER is configured to a large > > value, e.g. 36 for a system with huge amount of memory, then there is o= nly > 28 bits left for the pfn, which is not enough. >=20 > Not related to the balloon but how would it help to set MAX_ORDER to 36? >=20 My point here is MAX_ORDER may be configured to a big value. > What the MAX_ORDER affects is that you won't be able to ask the kernel > page allocator for contiguous memory bigger than 1<<(MAX_ORDER-1), but > that's a driver issue not relevant to the amount of RAM. Drivers won't > suddenly start to ask the kernel allocator to allocate compound pages at > orders >=3D 11 just because more RAM was added. >=20 > The higher the MAX_ORDER the slower the kernel runs simply so the smaller > the MAX_ORDER the better. >=20 > > Should we limit the MAX_ORDER? I don't think so. >=20 > We shouldn't strictly depend on MAX_ORDER value but it's mostly limited > already even if configurable at build time. >=20 I didn't know that and will take a look, thanks for your information. Liang > We definitely need it to reach at least the hugepage size, then it's most= ly > driver issue, but drivers requiring large contiguous allocations should r= ely on > CMA only or vmalloc if they only require it virtually contiguous, and not= rely > on larger MAX_ORDER that would slowdown all kernel allocations/freeing.