From 98f3cfc1dc7a53b629d43b7844a9b3f786213048 Mon Sep 17 00:00:00 2001 From: Yasunori Goto Date: Tue, 16 Oct 2007 01:26:14 -0700 Subject: memory hotplug: Hot-add with sparsemem-vmemmap This patch is to avoid panic when memory hot-add is executed with sparsemem-vmemmap. Current vmemmap-sparsemem code doesn't support memory hot-add. Vmemmap must be populated when hot-add. This is for 2.6.23-rc2-mm2. Todo: # Even if this patch is applied, the message "[xxxx-xxxx] potential offnode page_structs" is displayed. To allocate memmap on its node, memmap (and pgdat) must be initialized itself like chicken and egg relationship. # vmemmap_unpopulate will be necessary for followings. - For cancel hot-add due to error. - For unplug. Signed-off-by: Yasunori Goto Cc: Andy Whitcroft Cc: Christoph Lameter Cc: Mel Gorman Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/sparse-vmemmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mm/sparse-vmemmap.c') diff --git a/mm/sparse-vmemmap.c b/mm/sparse-vmemmap.c index 4f2d4854f84..d3b718b0c20 100644 --- a/mm/sparse-vmemmap.c +++ b/mm/sparse-vmemmap.c @@ -137,7 +137,7 @@ int __meminit vmemmap_populate_basepages(struct page *start_page, return 0; } -struct page __init *sparse_early_mem_map_populate(unsigned long pnum, int nid) +struct page * __meminit sparse_mem_map_populate(unsigned long pnum, int nid) { struct page *map = pfn_to_page(pnum * PAGES_PER_SECTION); int error = vmemmap_populate(map, PAGES_PER_SECTION, nid); -- cgit v1.2.3