From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Andy Whitcroft <apw@shadowen.org>,
Dave Hansen <haveblue@us.ibm.com>,
Gerald Schaefer <gerald.schaefer@de.ibm.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: memory_hotplug: always initialize pageblock bitmap.
Date: Tue, 13 May 2008 20:52:42 +0200 [thread overview]
Message-ID: <20080513185242.GA6465@osiris.boeblingen.de.ibm.com> (raw)
In-Reply-To: <20080513115825.GB12339@osiris.boeblingen.de.ibm.com>
On Tue, May 13, 2008 at 01:58:25PM +0200, Heiko Carstens wrote:
> From: Heiko Carstens <heiko.carstens@de.ibm.com>
>
> Trying to online a new memory section that was added via memory hotplug
> sometimes results in crashes when the new pages are added via __free_page.
> Reason for that is that the pageblock bitmap isn't initialized and hence
> contains random stuff. That means that get_pageblock_migratetype() returns
> also random stuff and therefore
>
> list_add(&page->lru,
> &zone->free_area[order].free_list[migratetype]);
>
> in __free_one_page() tries to do a list_add to something that isn't even
> necessarily a list.
>
> This happens since 86051ca5eaf5e560113ec7673462804c54284456
> ("mm: fix usemap initialization") which makes sure that the pageblock
> bitmap gets only initialized for pages present in a zone.
> Unfortunately for hot-added memory the zones "grow" after the memmap
> and the pageblock memmap have been initialized. Which means that the
> new pages have an unitialized bitmap.
> To solve this the calls to grow_zone_span() and grow_pgdat_span() are
> moved to __add_zone() just before the initialization happens.
>
> The patch also moves the two functions since __add_zone() is the only
> caller and I didn't want to add a forward declaration.
>
> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
> Cc: Andy Whitcroft <apw@shadowen.org>
> Cc: Dave Hansen <haveblue@us.ibm.com>
> Cc: Gerald Schaefer <gerald.schaefer@de.ibm.com>
> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> Cc: Yasunori Goto <y-goto@jp.fujitsu.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
Oops... the patch is tested and works for me. However it was not Signed-off
by Andrew. And in addition I forgot to add [PATCH] to the subject.
Sorry about that!
If all agree that this patch is ok it should probably also go into
-stable, since it fixes the above mentioned regression.
--
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: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-05-13 18:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-09 6:06 [PATCH] " Heiko Carstens, Heiko Carstens
2008-05-09 6:39 ` KAMEZAWA Hiroyuki
2008-05-09 6:45 ` Heiko Carstens
2008-05-10 12:45 ` Heiko Carstens
2008-05-12 1:55 ` KAMEZAWA Hiroyuki
2008-05-12 9:19 ` KAMEZAWA Hiroyuki
2008-05-13 11:58 ` Heiko Carstens, Heiko Carstens
2008-05-13 18:52 ` Heiko Carstens [this message]
2008-05-14 0:52 ` KAMEZAWA Hiroyuki
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=20080513185242.GA6465@osiris.boeblingen.de.ibm.com \
--to=heiko.carstens@de.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=apw@shadowen.org \
--cc=gerald.schaefer@de.ibm.com \
--cc=haveblue@us.ibm.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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