From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752849Ab3CRPLd (ORCPT ); Mon, 18 Mar 2013 11:11:33 -0400 Received: from mail-bl2lp0204.outbound.protection.outlook.com ([207.46.163.204]:11334 "EHLO na01-bl2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751629Ab3CRPLc convert rfc822-to-8bit (ORCPT ); Mon, 18 Mar 2013 11:11:32 -0400 X-Forefront-Antispam-Report-Untrusted: CIP:157.56.240.21;KIP:(null);UIP:(null);(null);H:BL2PRD0310HT002.namprd03.prod.outlook.com;R:internal;EFV:INT X-SpamScore: -5 X-BigFish: PS-5(zz98dI9371I936eI154dI542I1432I1447Izz1f42h1ee6h1de0h1202h1e76h1d1ah1d2ahzz8275bhz31h2a8h668h839h944hd24hf0ah1220h1288h12a5h12a9h12bdh137ah13b6h1441h1504h1537h153bh162dh1631h1758h18e1h1946h19b5h19ceh1ad9h1b0ah9a9j1155h) X-Forefront-Antispam-Report-Untrusted: SFV:SKI;SFS:;DIR:OUT;SFP:;SCL:-1;SRVR:SN2PR03MB063;H:SN2PR03MB061.namprd03.prod.outlook.com;LANG:en; From: KY Srinivasan To: Michal Hocko CC: "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" , "devel@linuxdriverproject.org" , "olaf@aepfle.de" , "apw@canonical.com" , "andi@firstfloor.org" , "akpm@linux-foundation.org" , "linux-mm@kvack.org" , "kamezawa.hiroyuki@gmail.com" , "hannes@cmpxchg.org" , "yinghan@google.com" Subject: RE: [PATCH 2/2] Drivers: hv: balloon: Support 2M page allocations for ballooning Thread-Topic: [PATCH 2/2] Drivers: hv: balloon: Support 2M page allocations for ballooning Thread-Index: AQHOIor1LgHvUCf0sk63c922DTSOMZirSGmAgAArsPCAAAw3AIAADsVQ Date: Mon, 18 Mar 2013 15:08:36 +0000 Message-ID: <98cd176931934b59a0fcb1ec3448d86c@SN2PR03MB061.namprd03.prod.outlook.com> References: <1363470088-24565-1-git-send-email-kys@microsoft.com> <1363470125-24606-1-git-send-email-kys@microsoft.com> <1363470125-24606-2-git-send-email-kys@microsoft.com> <20130318105257.GG10192@dhcp22.suse.cz> <1701384b10204014b53acecb006521b0@SN2PR03MB061.namprd03.prod.outlook.com> <20130318141302.GO10192@dhcp22.suse.cz> In-Reply-To: <20130318141302.GO10192@dhcp22.suse.cz> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [98.110.61.163] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-OrganizationHeadersPreserved: SN2PR03MB063.namprd03.prod.outlook.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-FOPE-CONNECTOR: Id%59$Dn%KVACK.ORG$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn% X-FOPE-CONNECTOR: Id%59$Dn%LINUX-FOUNDATION.ORG$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn% X-FOPE-CONNECTOR: Id%59$Dn%FIRSTFLOOR.ORG$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn% X-FOPE-CONNECTOR: Id%59$Dn%GOOGLE.COM$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn% X-FOPE-CONNECTOR: Id%59$Dn%CMPXCHG.ORG$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn% X-FOPE-CONNECTOR: Id%59$Dn%GMAIL.COM$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn% X-FOPE-CONNECTOR: Id%59$Dn%VGER.KERNEL.ORG$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn% X-FOPE-CONNECTOR: Id%59$Dn%LINUXFOUNDATION.ORG$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn% X-FOPE-CONNECTOR: Id%59$Dn%SUSE.CZ$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn% X-FOPE-CONNECTOR: Id%59$Dn%CANONICAL.COM$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn% X-FOPE-CONNECTOR: Id%59$Dn%AEPFLE.DE$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn% X-FOPE-CONNECTOR: Id%59$Dn%LINUXDRIVERPROJECT.ORG$RO%2$TLS%6$FQDN%corpf5vips-237160.customer.frontbridge.com$TlsDn% X-CrossPremisesHeadersPromoted: TK5EX14HUBC101.redmond.corp.microsoft.com X-CrossPremisesHeadersFiltered: TK5EX14HUBC101.redmond.corp.microsoft.com X-Forefront-Antispam-Report: CIP:131.107.125.37;CTRY:US;IPV:CAL;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(54534002)(189002)(199002)(24454001)(51704002)(51914002)(13464002)(377424002)(377454001)(47976001)(6806001)(46406002)(76482001)(51856001)(47776003)(44976002)(56816002)(5343635001)(31966008)(33646001)(20776003)(49866001)(47736001)(80022001)(54316002)(54356001)(46102001)(16676001)(74502001)(4396001)(66066001)(53806001)(56776001)(77982001)(74662001)(65816001)(59766001)(23726001)(79102001)(50466001)(50986001)(63696002)(69226001)(47446002)(24736002);DIR:OUT;SFP:;SCL:1;SRVR:BL2FFO11HUB024;H:TK5EX14HUBC101.redmond.corp.microsoft.com;RD:InfoDomainNonexistent;MX:1;A:1;LANG:en; X-OriginatorOrg: microsoft.onmicrosoft.com X-Forefront-PRVS: 07891BF289 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > -----Original Message----- > From: Michal Hocko [mailto:mhocko@suse.cz] > Sent: Monday, March 18, 2013 10:13 AM > To: KY Srinivasan > Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; > devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com; > andi@firstfloor.org; akpm@linux-foundation.org; linux-mm@kvack.org; > kamezawa.hiroyuki@gmail.com; hannes@cmpxchg.org; yinghan@google.com > Subject: Re: [PATCH 2/2] Drivers: hv: balloon: Support 2M page allocations for > ballooning > > On Mon 18-03-13 13:44:05, KY Srinivasan wrote: > > > > > > > -----Original Message----- > > > From: Michal Hocko [mailto:mhocko@suse.cz] > > > Sent: Monday, March 18, 2013 6:53 AM > > > To: KY Srinivasan > > > Cc: gregkh@linuxfoundation.org; linux-kernel@vger.kernel.org; > > > devel@linuxdriverproject.org; olaf@aepfle.de; apw@canonical.com; > > > andi@firstfloor.org; akpm@linux-foundation.org; linux-mm@kvack.org; > > > kamezawa.hiroyuki@gmail.com; hannes@cmpxchg.org; > yinghan@google.com > > > Subject: Re: [PATCH 2/2] Drivers: hv: balloon: Support 2M page allocations for > > > ballooning > > > > > > On Sat 16-03-13 14:42:05, K. Y. Srinivasan wrote: > > > > While ballooning memory out of the guest, attempt 2M allocations first. > > > > If 2M allocations fail, then go for 4K allocations. In cases where we > > > > have performed 2M allocations, split this 2M page so that we can free this > > > > page at 4K granularity (when the host returns the memory). > > > > > > Maybe I am missing something but what is the advantage of 2M allocation > > > when you split it up immediately so you are not using it as a huge page? > > > > The Hyper-V ballooning protocol specifies the pages being ballooned as > > page ranges - start_pfn: number_of_pfns. So, when the guest balloon > > is inflating and I am able to allocate 2M pages, I will be able to > > represent 512 contiguous pages in one 64 bit entry and this makes the > > ballooning operation that much more efficient. The reason I split the > > page is that the host does not guarantee that when it returns the > > memory to the guest, it will return in any particular granularity and > > so I have to be able to free this memory in 4K granularity. This is > > the corner case that I will have to handle. > > Thanks for the clarification. I think this information would be valuable > in the changelog. Thanks Michal. I will resend the patches with the changes you have suggested. What is your recommendation with regards which tree the mm patch needs to go through; the Hyper-V balloon driver patch will go through Greg's tree. Regards, K. Y > -- > Michal Hocko > SUSE Labs >