summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorYasunori Goto <y-goto@jp.fujitsu.com>2008-04-28 09:13:32 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-28 15:58:25 (GMT)
commit9d99217a02a06a7cc83f065b73e976970970c58c (patch)
tree14d270c37701f9ae621c9cd8b076e207ee86e5d0 /mm
parent04753278769f3b6c3b79a080edb52f21d83bf6e2 (diff)
downloadlinux-9d99217a02a06a7cc83f065b73e976970970c58c.tar.xz
memory hotplug: align memmap to page size
To free memmap easier, this patch aligns it to page size. Bootmem allocater may mix some objects in one pages. It's not good for freeing memmap of memory hot-remove. Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: Badari Pulavarty <pbadari@us.ibm.com> Cc: Yinghai Lu <yhlu.kernel@gmail.com> Cc: Yasunori Goto <y-goto@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/sparse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mm/sparse.c b/mm/sparse.c
index 8903c48..5398d48 100644
--- a/mm/sparse.c
+++ b/mm/sparse.c
@@ -273,8 +273,8 @@ struct page __init *sparse_mem_map_populate(unsigned long pnum, int nid)
if (map)
return map;
- map = alloc_bootmem_node(NODE_DATA(nid),
- sizeof(struct page) * PAGES_PER_SECTION);
+ map = alloc_bootmem_pages_node(NODE_DATA(nid),
+ PAGE_ALIGN(sizeof(struct page) * PAGES_PER_SECTION));
return map;
}
#endif /* !CONFIG_SPARSEMEM_VMEMMAP */