From: Gerald Schaefer <geralds@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linuxppc-dev@ozlabs.org, Robert Jennings <rcj@linux.vnet.ibm.com>
Cc: Nick Piggin <npiggin@suse.de>,
Christoph Lameter <cl@linux-foundation.org>,
Mel Gorman <mel@csn.ul.ie>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Badari Pulavarty <pbadari@us.ibm.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Brian King <brking@linux.vnet.ibm.com>,
Paul Mackerras <paulus@samba.org>, Ingo Molnar <mingo@elte.hu>,
gerald.schaefer@de.ibm.com
Subject: Re: [PATCH 2/2][v2] powerpc: Make the CMM memory hotplug aware
Date: Thu, 15 Oct 2009 20:21:16 +0200 [thread overview]
Message-ID: <4AD7681C.7060800@linux.vnet.ibm.com> (raw)
In-Reply-To: <20091008131355.GA22118@austin.ibm.com>
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?
>
> The pages allocated as __GFP_MOVABLE are used to store the list of pages
> allocated by the balloon. They reference virtual addresses and it would
> be fine for the kernel to migrate the physical pages for those, the
> balloon would not notice this.
Does page migration really work for kernel pages that were allocated
with __get_free_page()? I was wondering if we can do this on s390, where
we have a 1:1 mapping of kernel virtual to physical addresses, but
looking at migrate_pages() and friends, it seems that kernel pages
w/o mapping and rmap should not be migrateable at all. Any thoughts from
the memory migration experts?
BTW, since we have real memory hotplug support on s390, allowing us
to add and remove memory chunks to/from ZONE_MOVABLE, this basically
makes cmm ballooning in ZONE_NORMAL obsolete, so we decided not to
support memory hotplug aware cmm on s390.
Regards,
Gerald
next prev parent reply other threads:[~2009-10-15 18:21 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-02 18:44 [PATCH 1/2][v2] mm: add notifier in pageblock isolation for balloon drivers Robert Jennings
2009-10-02 18:52 ` [PATCH 2/2][v2] powerpc: Make the CMM memory hotplug aware Robert Jennings
2009-10-08 12:12 ` Gerald Schaefer
2009-10-08 13:13 ` Robert Jennings
2009-10-15 18:21 ` Gerald Schaefer [this message]
2009-10-16 16:48 ` Christoph Lameter
2009-10-08 23:34 ` [PATCH 1/2][v2] mm: add notifier in pageblock isolation for balloon drivers Andrew Morton
2009-10-09 20:23 ` Robert Jennings
2009-10-09 20:43 ` Mel Gorman
2009-10-13 15:48 ` Robert Jennings
2009-10-09 0:47 ` KAMEZAWA Hiroyuki
2009-10-09 14:33 ` Robert Jennings
2009-10-09 11:21 ` Mel Gorman
2009-10-09 14:43 ` Robert Jennings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4AD7681C.7060800@linux.vnet.ibm.com \
--to=geralds@linux.vnet.ibm.com \
--cc=brking@linux.vnet.ibm.com \
--cc=cl@linux-foundation.org \
--cc=gerald.schaefer@de.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=mel@csn.ul.ie \
--cc=mingo@elte.hu \
--cc=npiggin@suse.de \
--cc=paulus@samba.org \
--cc=pbadari@us.ibm.com \
--cc=rcj@linux.vnet.ibm.com \
--cc=schwidefsky@de.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).