From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mtagate3.de.ibm.com (mtagate3.de.ibm.com [195.212.17.163]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mtagate3.de.ibm.com", Issuer "Equifax" (verified OK)) by ozlabs.org (Postfix) with ESMTPS id 9C506B7B68 for ; Thu, 8 Oct 2009 23:12:38 +1100 (EST) Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.13.1/8.13.1) with ESMTP id n98CCRNk010064 for ; Thu, 8 Oct 2009 12:12:27 GMT Received: from d12av04.megacenter.de.ibm.com (d12av04.megacenter.de.ibm.com [9.149.165.229]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n98CCRw12695198 for ; Thu, 8 Oct 2009 14:12:28 +0200 Received: from d12av04.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n98CCQtX016360 for ; Thu, 8 Oct 2009 14:12:27 +0200 Message-ID: <4ACDD71D.30809@linux.vnet.ibm.com> Date: Thu, 08 Oct 2009 14:12:13 +0200 From: Gerald Schaefer MIME-Version: 1.0 To: Robert Jennings Subject: Re: [PATCH 2/2][v2] powerpc: Make the CMM memory hotplug aware References: <20091002184458.GC4908@austin.ibm.com> <20091002185248.GD4908@austin.ibm.com> In-Reply-To: <20091002185248.GD4908@austin.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: linux-mm@kvack.org, Mel Gorman , linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org, Martin Schwidefsky , Badari Pulavarty , Brian King , Paul Mackerras , Ingo Molnar Reply-To: gerald.schaefer@de.ibm.com List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hi, I am currently working on the s390 port for the cmm + hotplug patch, and I'm a little confused about the memory allocation policy, see below. Is it correct that the balloon cannot grow into ZONE_MOVABLE, while the pages for the balloon page list can? Robert Jennings wrote: > @@ -110,6 +125,9 @@ static long cmm_alloc_pages(long nr) > cmm_dbg("Begin request for %ld pages\n", nr); > > while (nr) { > + if (atomic_read(&hotplug_active)) > + break; > + > addr = __get_free_page(GFP_NOIO | __GFP_NOWARN | > __GFP_NORETRY | __GFP_NOMEMALLOC); > if (!addr) > @@ -119,8 +137,10 @@ static long cmm_alloc_pages(long nr) > if (!pa || pa->index >= CMM_NR_PAGES) { > /* Need a new page for the page list. */ > spin_unlock(&cmm_lock); > - npa = (struct cmm_page_array *)__get_free_page(GFP_NOIO | __GFP_NOWARN | > - __GFP_NORETRY | __GFP_NOMEMALLOC); > + npa = (struct cmm_page_array *)__get_free_page( > + GFP_NOIO | __GFP_NOWARN | > + __GFP_NORETRY | __GFP_NOMEMALLOC | > + __GFP_MOVABLE); > if (!npa) { > pr_info("%s: Can not allocate new page list\n", __func__); > free_page(addr); Why is the __GFP_MOVABLE added here, for the page list alloc, and not above for the balloon page alloc? -- Regards, Gerald From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932124AbZJHMNM (ORCPT ); Thu, 8 Oct 2009 08:13:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757576AbZJHMNM (ORCPT ); Thu, 8 Oct 2009 08:13:12 -0400 Received: from mtagate7.de.ibm.com ([195.212.17.167]:59615 "EHLO mtagate7.de.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755801AbZJHMNL (ORCPT ); Thu, 8 Oct 2009 08:13:11 -0400 Message-ID: <4ACDD71D.30809@linux.vnet.ibm.com> Date: Thu, 08 Oct 2009 14:12:13 +0200 From: Gerald Schaefer Reply-To: gerald.schaefer@de.ibm.com User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: Robert Jennings CC: Mel Gorman , Ingo Molnar , Badari Pulavarty , Brian King , Benjamin Herrenschmidt , Paul Mackerras , Martin Schwidefsky , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@ozlabs.org Subject: Re: [PATCH 2/2][v2] powerpc: Make the CMM memory hotplug aware References: <20091002184458.GC4908@austin.ibm.com> <20091002185248.GD4908@austin.ibm.com> In-Reply-To: <20091002185248.GD4908@austin.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, I am currently working on the s390 port for the cmm + hotplug patch, and I'm a little confused about the memory allocation policy, see below. Is it correct that the balloon cannot grow into ZONE_MOVABLE, while the pages for the balloon page list can? Robert Jennings wrote: > @@ -110,6 +125,9 @@ static long cmm_alloc_pages(long nr) > cmm_dbg("Begin request for %ld pages\n", nr); > > while (nr) { > + if (atomic_read(&hotplug_active)) > + break; > + > addr = __get_free_page(GFP_NOIO | __GFP_NOWARN | > __GFP_NORETRY | __GFP_NOMEMALLOC); > if (!addr) > @@ -119,8 +137,10 @@ static long cmm_alloc_pages(long nr) > if (!pa || pa->index >= CMM_NR_PAGES) { > /* Need a new page for the page list. */ > spin_unlock(&cmm_lock); > - npa = (struct cmm_page_array *)__get_free_page(GFP_NOIO | __GFP_NOWARN | > - __GFP_NORETRY | __GFP_NOMEMALLOC); > + npa = (struct cmm_page_array *)__get_free_page( > + GFP_NOIO | __GFP_NOWARN | > + __GFP_NORETRY | __GFP_NOMEMALLOC | > + __GFP_MOVABLE); > if (!npa) { > pr_info("%s: Can not allocate new page list\n", __func__); > free_page(addr); Why is the __GFP_MOVABLE added here, for the page list alloc, and not above for the balloon page alloc? -- Regards, Gerald From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail190.messagelabs.com (mail190.messagelabs.com [216.82.249.51]) by kanga.kvack.org (Postfix) with ESMTP id 300C06B004F for ; Thu, 8 Oct 2009 08:12:37 -0400 (EDT) Received: from d12nrmr1607.megacenter.de.ibm.com (d12nrmr1607.megacenter.de.ibm.com [9.149.167.49]) by mtagate3.de.ibm.com (8.13.1/8.13.1) with ESMTP id n98CCYj8010217 for ; Thu, 8 Oct 2009 12:12:34 GMT Received: from d12av04.megacenter.de.ibm.com (d12av04.megacenter.de.ibm.com [9.149.165.229]) by d12nrmr1607.megacenter.de.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id n98CCRur3100886 for ; Thu, 8 Oct 2009 14:12:33 +0200 Received: from d12av04.megacenter.de.ibm.com (loopback [127.0.0.1]) by d12av04.megacenter.de.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n98CCQtT016360 for ; Thu, 8 Oct 2009 14:12:27 +0200 Message-ID: <4ACDD71D.30809@linux.vnet.ibm.com> Date: Thu, 08 Oct 2009 14:12:13 +0200 From: Gerald Schaefer Reply-To: gerald.schaefer@de.ibm.com MIME-Version: 1.0 Subject: Re: [PATCH 2/2][v2] powerpc: Make the CMM memory hotplug aware References: <20091002184458.GC4908@austin.ibm.com> <20091002185248.GD4908@austin.ibm.com> In-Reply-To: <20091002185248.GD4908@austin.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org To: Robert Jennings Cc: Mel Gorman , Ingo Molnar , Badari Pulavarty , Brian King , Benjamin Herrenschmidt , Paul Mackerras , Martin Schwidefsky , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linuxppc-dev@ozlabs.org List-ID: Hi, I am currently working on the s390 port for the cmm + hotplug patch, and I'm a little confused about the memory allocation policy, see below. Is it correct that the balloon cannot grow into ZONE_MOVABLE, while the pages for the balloon page list can? Robert Jennings wrote: > @@ -110,6 +125,9 @@ static long cmm_alloc_pages(long nr) > cmm_dbg("Begin request for %ld pages\n", nr); > > while (nr) { > + if (atomic_read(&hotplug_active)) > + break; > + > addr = __get_free_page(GFP_NOIO | __GFP_NOWARN | > __GFP_NORETRY | __GFP_NOMEMALLOC); > if (!addr) > @@ -119,8 +137,10 @@ static long cmm_alloc_pages(long nr) > if (!pa || pa->index >= CMM_NR_PAGES) { > /* Need a new page for the page list. */ > spin_unlock(&cmm_lock); > - npa = (struct cmm_page_array *)__get_free_page(GFP_NOIO | __GFP_NOWARN | > - __GFP_NORETRY | __GFP_NOMEMALLOC); > + npa = (struct cmm_page_array *)__get_free_page( > + GFP_NOIO | __GFP_NOWARN | > + __GFP_NORETRY | __GFP_NOMEMALLOC | > + __GFP_MOVABLE); > if (!npa) { > pr_info("%s: Can not allocate new page list\n", __func__); > free_page(addr); Why is the __GFP_MOVABLE added here, for the page list alloc, and not above for the balloon page alloc? -- Regards, Gerald -- 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