lkml.org 
[lkml]   [2008]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] memory_hotplug: always initialize pageblock bitmap.
On Fri, 9 May 2008 08:06:09 +0200
Heiko Carstens <heiko.carstens@de.ibm.com> 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.

Hmm, curious. In my understanding, memmap_init_zone() initializes it.

__add_pages()
-> __add_section()
-> sparse-add_one_section() // allocate usemap
-> __add_zone()
-> memmap_init_zone() // reset pageblock's bitmap

Can't memmap_init_zone() does proper initialization ?
........................
Ah, ok. I see. grow_zone_span() is not called at __add_zone(), then,
memmap_init_zone() doesn't initialize usemap because memmap is not in zone's
range.

Recently, I added a check "zone's start_pfn < pfn < zone's end"
to memmap_init_zone()'s usemap initialization for !SPARSEMEM case bug FIX.
(and I think the fix itself is sane.)

How about calling grow_pgdat_span()/grow_zone_span() from __add_zone() ?

Thanks,
-Kame



\
 
 \ /
  Last update: 2008-05-09 08:45    [W:0.051 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site