Skip to contentSkip to conversation

ia64 specific for Sizing zones and holes in an architecture independent

PATCH In review Bob Picco 2 participants 3 messages Aug 29, 2006 – Sep 10, 2006

lore
Share & tools
lore

Bob Picco

author
#0 lore raw

PATCH 1/1 ia64 specific for Sizing zones and holes in an architecture independent

Andrew,

Mel's latest V9 regressed slightly for ia64 FLATMEM+VIRTUAL_MEM_MAP. When the largest hole is greater than LARGE_GAP, vmem_map is allocated before free_area_init_nodes; resultant crash follows. Rather than complicate alloc_node_mem_map just for this ia64 case, add an adjustment to node_mem_map which is later negated by alloc_node_mem_map.

Previous to V9, the mem_map adjustment was done in the scope where allocation is achieved in alloc_node_mem_map. The current code is more appropriate but unfortunately caused an issue for ia64.

Please add this to the next -mm.

thanks,

bob

 arch/ia64/mm/contig.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
arch/ia64/mm/contig.c +6 -1
Index: linux-2.6.18-rc4-mm3/arch/ia64/mm/contig.c
===================================================================
@@ -252,7 +252,12 @@ paging_init (void)
 		vmem_map = (struct page *) vmalloc_end;
 		efi_memmap_walk(create_mem_map_page_table, NULL);
 
-		NODE_DATA(0)->node_mem_map = vmem_map;
+		/*
+		 * alloc_node_mem_map makes an adjustment for mem_map
+		 * which isn't compatible with vmem_map.
+		 */
+		NODE_DATA(0)->node_mem_map = vmem_map +
+			find_min_pfn_with_active_regions();
 		free_area_init_nodes(max_zone_pfns);
 
 		printk("Virtual mem_map starts at 0x%p\n", mem_map);
#1 lore raw
Quoted 29 lines · Bob Picco

Andrew,

Mel's latest V9 regressed slightly for ia64 FLATMEM+VIRTUAL_MEM_MAP. When the largest hole is greater than LARGE_GAP, vmem_map is allocated before free_area_init_nodes; resultant crash follows. Rather than complicate alloc_node_mem_map just for this ia64 case, add an adjustment to node_mem_map which is later negated by alloc_node_mem_map.

Previous to V9, the mem_map adjustment was done in the scope where allocation is achieved in alloc_node_mem_map. The current code is more appropriate but unfortunately caused an issue for ia64.

Please add this to the next -mm.

thanks,

bob

 arch/ia64/mm/contig.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Index: linux-2.6.18-rc4-mm3/arch/ia64/mm/contig.c
===================================================================

arch/ia64/mm/contig.c paging_init (void) · line 258

Quoted 8 lines
arch/ia64/mm/contig.c +4 -1
@@ -252,7 +252,12 @@ paging_init (void)
 		vmem_map = (struct page *) vmalloc_end;
 		efi_memmap_walk(create_mem_map_page_table, NULL);
 
-		NODE_DATA(0)->node_mem_map = vmem_map;
+		/*
+		 * alloc_node_mem_map makes an adjustment for mem_map
+		 * which isn't compatible with vmem_map.
+		 */

Bob, which adjustment is this that is incompatible? Is it the one in the final stanza, the FLATMEM mem_map instantiation? This one?

#ifdef CONFIG_ARCH_POPULATES_NODE_MAP
                if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
                        mem_map -= pgdat->node_start_pfn;

#endif /* CONFIG_ARCH_POPULATES_NODE_MAP */

-apw

Quoted 10 lines
arch/ia64/mm/contig.c +2 -1
+		NODE_DATA(0)->node_mem_map = vmem_map +
+			find_min_pfn_with_active_regions();
 		free_area_init_nodes(max_zone_pfns);
 
 		printk("Virtual mem_map starts at 0x%p\n", mem_map);
-

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

author
#2 lore raw

Andy Wihitcroft wrote: [Sat Sep 09 2006, 09:03:09PM EDT]

Quoted 33 lines
Quoted 32 lines · Bob Picco

Andrew,

Mel's latest V9 regressed slightly for ia64 FLATMEM+VIRTUAL_MEM_MAP. When the largest hole is greater than LARGE_GAP, vmem_map is allocated before free_area_init_nodes; resultant crash follows. Rather than complicate alloc_node_mem_map just for this ia64 case, add an adjustment to node_mem_map which is later negated by alloc_node_mem_map.

Previous to V9, the mem_map adjustment was done in the scope where allocation is achieved in alloc_node_mem_map. The current code is more appropriate but unfortunately caused an issue for ia64.

Please add this to the next -mm.

thanks,

bob

 arch/ia64/mm/contig.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Index: linux-2.6.18-rc4-mm3/arch/ia64/mm/contig.c
===================================================================

arch/ia64/mm/contig.c +0 -0
@@ -252,7 +252,12 @@ paging_init (void)
 		vmem_map = (struct page *) vmalloc_end;
 		efi_memmap_walk(create_mem_map_page_table, NULL);
 
Quoted 8 lines

arch/ia64/mm/contig.c paging_init (void) · line 258

Quoted 5 lines
arch/ia64/mm/contig.c +4 -1
-		NODE_DATA(0)->node_mem_map = vmem_map;
+		/*
+		 * alloc_node_mem_map makes an adjustment for mem_map
+		 * which isn't compatible with vmem_map.
+		 */

Bob, which adjustment is this that is incompatible? Is it the one in the final stanza, the FLATMEM mem_map instantiation? This one?

Andy, yes this is the one.

Quoted 7 lines
#ifdef CONFIG_ARCH_POPULATES_NODE_MAP
                if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
                        mem_map -= pgdat->node_start_pfn;

#endif /* CONFIG_ARCH_POPULATES_NODE_MAP */

-apw

bob

Quoted 12 lines
Quoted 11 lines
arch/ia64/mm/contig.c +2 -1
+		NODE_DATA(0)->node_mem_map = vmem_map +
+			find_min_pfn_with_active_regions();
 		free_area_init_nodes(max_zone_pfns);
 
 		printk("Virtual mem_map starts at 0x%p\n", mem_map);
-

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/