This actually allocates the sections at runtime. Note that this goes later in the whole series, after the hotplug patches are added. It uses thinkgs like pgdat_resize_lock() that are not in mainline or -mm, yet. Signed-off-by: Dave Hansen --- include/linux/mmzone.h | 0 memhotplug-dave/mm/sparse.c | 7 ++++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff -puN mm/sparse.c~A7-extreme-hotplug-implementation mm/sparse.c --- memhotplug/mm/sparse.c~A7-extreme-hotplug-implementation 2005-07-28 13:50:16.000000000 -0700 +++ memhotplug-dave/mm/sparse.c 2005-07-28 13:50:16.000000000 -0700 @@ -29,7 +29,10 @@ static struct mem_section *sparse_index_ unsigned long array_size = SECTIONS_PER_ROOT * sizeof(struct mem_section); - section = alloc_bootmem_node(NODE_DATA(nid), array_size); + if (system_state < SYSTEM_RUNNING) + section = alloc_bootmem_node(NODE_DATA(nid), array_size); + else + section = kmalloc_node(array_size, GFP_KERNEL, nid); if (section) memset(section, 0, array_size); @@ -52,6 +55,8 @@ static int sparse_index_init(unsigned lo spin_lock(&index_init_lock); if (mem_section[root]) { + if (system_state >= SYSTEM_RUNNING) + kfree(mem_section); ret = -EEXIST; goto out; } diff -puN include/linux/mmzone.h~A7-extreme-hotplug-implementation include/linux/mmzone.h _