From: Yasunori Goto Date: Mon, 28 Apr 2008 09:13:32 +0000 (-0700) Subject: memory hotplug: align memmap to page size X-Git-Tag: v2.6.26-rc1~932 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d99217a02a06a7cc83f065b73e976970970c58c;p=linux-2.6 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 Cc: Badari Pulavarty Cc: Yinghai Lu Cc: Yasunori Goto Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/sparse.c b/mm/sparse.c index 8903c48438..5398d48c36 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 */