Dave Hansen wrote: [Thu Mar 03 2005, 12:17:36PM EST] > Here's a refresh of the hot-add portion again. Almost all of the > infrastructure pieces before sparse are in -mm, and are clearly marked > in the series file. > > ia64, and x86-64 will probably needs some updates to their Kconfig files > that look something like this: > > http://www.sr71.net/patches/2.6.11/2.6.11-mhp1/broken-out/FROM-MM-x86-abstract-discontigmem-setup-ppc64-fix.patch > > Otherwise, there isn't too much new here. Please let me know if you > encounter any problems. We need to start buttoning down the config > options to make sure that we only allow valid configurations. So, if > you run into any .config options that kill your compile or keep the > machine from booting, let's get those fixed up. > > -- Dave > Dave, There are two issues here. First, I was remiss by not replying to you about an old IA64 SPARSEMEM patch. Both issues are are within alloc_node_mem_map. For SPARSEMEM why would any arch use node_mem_map? Should what I propose be unacceptable, then I'd be left with loading node_mem_map with a non-zero value (like any) for each node to avoid the alloc_bootmem_node. Well I might be missing the bigger picture. For IA64 FLATMEM node_mem_map has been initialized in arch code but mem_map hasn't been. mem_map needs to be initialized. The current check in alloc_node_mem_map if (pgdat->node_mem_map || !pgdat->node_spanned_pages) return; won't achieve this. I've booted both DISCONTIGMEM, FLATMEM and SPARSEMEM. SPARSMEM boots without this patch but consumes lots of memory for page structures which won't be used and hanging off of node_mem_map. FLATMEM won't boot without patch. bob diff -ruNp -X /home/picco/losl/dontdiff linux-2.6.11-mhp1-orig/mm/page_alloc.c linux-2.6.11-mhp1/mm/page_alloc.c --- linux-2.6.11-mhp1-orig/mm/page_alloc.c 2005-03-03 20:03:50.000000000 -0500 +++ linux-2.6.11-mhp1/mm/page_alloc.c 2005-03-03 19:32:35.000000000 -0500 @@ -1768,14 +1768,18 @@ static void __init alloc_node_mem_map(st * Make sure that the architecture hasn't already allocated * a node_mem_map, and that the node contains memory. */ - if (pgdat->node_mem_map || !pgdat->node_spanned_pages) + if (!pgdat->node_spanned_pages) return; - size = (pgdat->node_spanned_pages + 1) * sizeof(struct page); - map = alloc_remap(pgdat->node_id, size); - if (!map) - map = alloc_bootmem_node(pgdat, size); - pgdat->node_mem_map = map; +#if defined(FLATMEM) || defined(DISCONTIGMEM) + if (!pgdat->node_mem_map) { + size = (pgdat->node_spanned_pages + 1) * sizeof(struct page); + map = alloc_remap(pgdat->node_id, size); + if (!map) + map = alloc_bootmem_node(pgdat, size); + pgdat->node_mem_map = map; + } +#endif #ifdef CONFIG_FLATMEM /*