Skip to contentSkip to conversation

don't pass mem_map into init functions

PATCH In review Dave Hansen 3 participants 9 messages Jul 28, 2004 – Jul 30, 2004

Subsystems (9)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 don't pass mem_map into init functions

When using CONFIG_NONLINEAR, a zone's mem_map isn't contiguous, and isn't allocated in the same place. This means that nonlinear doesn't really have a mem_map[] to pass into free_area_init_node() or memmap_init_zone() which makes any sense.

So, this patch removes the 'struct page *mem_map' argument to both of those functions. All non-NUMA architectures just pass a NULL in there, which is ignored. I've cc'd any NUMA architecture's maintainer who's code I've touched.

To replace the removed arguments, a call to pfn_to_page(node_start_pfn) is made. This is valid because all of the pfn_to_page() implementations rely only on the pgdats, which are already set up at this time. Plus, the pfn_to_page() method should work for any future nonlinear-type code.

Finally, the patch creates a function: node_alloc_mem_map(), which I plan to effectively #ifdef out for nonlinear at some future date.

Compile tested on SMP x86 and NUMAQ. I plan to give it a run on ppc64 in a bit. I'd appreciate if one of the ia64 guys could make sure it's OK for them as well.

 arch/alpha/mm/numa.c             |    2 +-
 arch/arm/mm/init.c               |    2 +-
 arch/arm26/mm/init.c             |    2 +-
 arch/cris/arch-v10/mm/init.c     |    2 +-
 arch/i386/mm/discontig.c         |    6 +++---
 arch/ia64/mm/contig.c            |    5 +++--
 arch/ia64/mm/discontig.c         |    4 ++--
 arch/ia64/mm/init.c              |    4 ++--
 arch/mips/sgi-ip27/ip27-memory.c |    2 +-
 arch/parisc/mm/init.c            |    2 +-
 arch/ppc64/mm/init.c             |    2 +-
 arch/ppc64/mm/numa.c             |    5 +++--
 arch/sh/mm/init.c                |    4 ++--
 arch/sh64/mm/init.c              |    2 +-
 arch/sparc/mm/srmmu.c            |    2 +-
 arch/sparc/mm/sun4c.c            |    2 +-
 arch/sparc64/mm/init.c           |    2 +-
 arch/v850/kernel/setup.c         |    2 +-
 arch/x86_64/mm/numa.c            |    2 +-
 include/linux/mm.h               |    4 ++--
 mm/page_alloc.c                  |   37 ++++++++++++++++++++-----------------
 21 files changed, 50 insertions(+), 45 deletions(-)

-- Dave

arch/alpha/mm/numa.c +1 -1
diff -ru C-create-__boot-ppc64/arch/alpha/mm/numa.c D-init-no-mem_map/arch/alpha/mm/numa.c
@@ -313,7 +313,7 @@
 			zones_size[ZONE_DMA] = dma_local_pfn;
 			zones_size[ZONE_NORMAL] = (end_pfn - start_pfn) - dma_local_pfn;
 		}
-		free_area_init_node(nid, NODE_DATA(nid), NULL, zones_size, start_pfn, NULL);
+		free_area_init_node(nid, NODE_DATA(nid), zones_size, start_pfn, NULL);
 	}
 
 	/* Initialize the kernel's ZERO_PGE. */
arch/arm/mm/init.c +1 -1
diff -ru C-create-__boot-ppc64/arch/arm/mm/init.c D-init-no-mem_map/arch/arm/mm/init.c
@@ -502,7 +502,7 @@
 		 */
 		arch_adjust_zones(node, zone_size, zhole_size);
 
-		free_area_init_node(node, pgdat, 0, zone_size,
+		free_area_init_node(node, pgdat, zone_size,
 				bdata->node_boot_start >> PAGE_SHIFT, zhole_size);
 	}
 
arch/arm26/mm/init.c +1 -1
diff -ru C-create-__boot-ppc64/arch/arm26/mm/init.c D-init-no-mem_map/arch/arm26/mm/init.c
@@ -306,7 +306,7 @@
 	if (!zone_size[0])
 		BUG();
 
-	free_area_init_node(0, pgdat, 0, zone_size,
+	free_area_init_node(0, pgdat, zone_size,
 			bdata->node_boot_start >> PAGE_SHIFT, zhole_size);
 
 	mem_map = NODE_DATA(0)->node_mem_map;
arch/cris/arch-v10/mm/init.c +1 -1
diff -ru C-create-__boot-ppc64/arch/cris/arch-v10/mm/init.c D-init-no-mem_map/arch/cris/arch-v10/mm/init.c
@@ -183,7 +183,7 @@
 	 * mem_map page array.
 	 */
 
-	free_area_init_node(0, &contig_page_data, 0, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0);
+	free_area_init_node(0, &contig_page_data, zones_size, PAGE_OFFSET >> PAGE_SHIFT, 0);
 	mem_map = contig_page_data.node_mem_map;
 }
 
arch/i386/mm/discontig.c +3 -3
diff -ru C-create-__boot-ppc64/arch/i386/mm/discontig.c D-init-no-mem_map/arch/i386/mm/discontig.c
@@ -418,16 +418,16 @@
 		 * remapped KVA area - mbligh
 		 */
 		if (!nid)
-			free_area_init_node(nid, NODE_DATA(nid), 0, 
+			free_area_init_node(nid, NODE_DATA(nid),
 				zones_size, start, zholes_size);
 		else {
 			unsigned long lmem_map;
 			lmem_map = (unsigned long)node_remap_start_vaddr[nid];
 			lmem_map += sizeof(pg_data_t) + PAGE_SIZE - 1;
 			lmem_map &= PAGE_MASK;
+			NODE_DATA(nid)->node_mem_map = (struct page *)lmem_map;
 			free_area_init_node(nid, NODE_DATA(nid), 
-				(struct page *)lmem_map, zones_size, 
-				start, zholes_size);
+				zones_size, start, zholes_size);
 		}
 	}
 	return;
arch/ia64/mm/contig.c +3 -2
diff -ru C-create-__boot-ppc64/arch/ia64/mm/contig.c D-init-no-mem_map/arch/ia64/mm/contig.c
@@ -267,7 +267,7 @@
 	efi_memmap_walk(find_largest_hole, (u64 *)&max_gap);
 	if (max_gap < LARGE_GAP) {
 		vmem_map = (struct page *) 0;
-		free_area_init_node(0, &contig_page_data, NULL, zones_size, 0,
+		free_area_init_node(0, &contig_page_data, zones_size, 0,
 				    zholes_size);
 		mem_map = contig_page_data.node_mem_map;
 	} else {
@@ -280,7 +280,8 @@
 		vmem_map = (struct page *) vmalloc_end;
 		efi_memmap_walk(create_mem_map_page_table, 0);
 
-		free_area_init_node(0, &contig_page_data, vmem_map, zones_size,
+		contig_page_data.node_mem_map = vmem_map;
+		free_area_init_node(0, &contig_page_data, zones_size,
 				    0, zholes_size);
 
 		mem_map = contig_page_data.node_mem_map;
arch/ia64/mm/discontig.c +2 -2
diff -ru C-create-__boot-ppc64/arch/ia64/mm/discontig.c D-init-no-mem_map/arch/ia64/mm/discontig.c
@@ -665,8 +665,8 @@
 
 		pfn_offset = mem_data[node].min_pfn;
 
-		free_area_init_node(node, NODE_DATA(node),
-				    vmem_map + pfn_offset, zones_size,
+		NODE_DATA(node)->node_mem_map = vmem_map + pfn_offset;
+		free_area_init_node(node, NODE_DATA(node), zones_size,
 				    pfn_offset, zholes_size);
 	}
 
arch/ia64/mm/init.c +2 -2
diff -ru C-create-__boot-ppc64/arch/ia64/mm/init.c D-init-no-mem_map/arch/ia64/mm/init.c
@@ -427,7 +427,7 @@
 		    / sizeof(struct page));
 
 	if (map_start < map_end)
-		memmap_init_zone(map_start, (unsigned long) (map_end - map_start),
+		memmap_init_zone((unsigned long) (map_end - map_start),
 				 args->nid, args->zone, page_to_pfn(map_start));
 	return 0;
 }
@@ -437,7 +437,7 @@
 	     unsigned long zone, unsigned long start_pfn)
 {
 	if (!vmem_map)
-		memmap_init_zone(start, size, nid, zone, start_pfn);
+		memmap_init_zone(size, nid, zone, start_pfn);
 	else {
 		struct memmap_init_callback_data args;
 
arch/mips/sgi-ip27/ip27-memory.c +1 -1
diff -ru C-create-__boot-ppc64/arch/mips/sgi-ip27/ip27-memory.c D-init-no-mem_map/arch/mips/sgi-ip27/ip27-memory.c
@@ -225,7 +225,7 @@
 		pfn_t end_pfn = node_getmaxclick(node) + 1;
 
 		zones_size[ZONE_DMA] = end_pfn - start_pfn;
-		free_area_init_node(node, NODE_DATA(node), NULL,
+		free_area_init_node(node, NODE_DATA(node),
 				zones_size, start_pfn, NULL);
 
 		if (end_pfn > max_low_pfn)
arch/parisc/mm/init.c +1 -1
diff -ru C-create-__boot-ppc64/arch/parisc/mm/init.c D-init-no-mem_map/arch/parisc/mm/init.c
@@ -761,7 +761,7 @@
 		unsigned long zones_size[MAX_NR_ZONES] = { 0, 0, 0, };
 
 		zones_size[ZONE_DMA] = pmem_ranges[i].pages;
-		free_area_init_node(i,NODE_DATA(i),NULL,zones_size,
+		free_area_init_node(i,NODE_DATA(i),zones_size,
 				(pmem_ranges[i].start_pfn << PAGE_SHIFT),0);
 	}
 
arch/ppc64/mm/init.c +1 -1
diff -ru C-create-__boot-ppc64/arch/ppc64/mm/init.c D-init-no-mem_map/arch/ppc64/mm/init.c
@@ -587,7 +587,7 @@
 	zones_size[ZONE_DMA] = top_of_ram >> PAGE_SHIFT;
 	zholes_size[ZONE_DMA] = (top_of_ram - total_ram) >> PAGE_SHIFT;
 
-	free_area_init_node(0, &contig_page_data, NULL, zones_size,
+	free_area_init_node(0, &contig_page_data, zones_size,
 			    __pa(PAGE_OFFSET) >> PAGE_SHIFT, zholes_size);
 	mem_map = contig_page_data.node_mem_map;
 }
arch/ppc64/mm/numa.c +3 -2
diff -ru C-create-__boot-ppc64/arch/ppc64/mm/numa.c D-init-no-mem_map/arch/ppc64/mm/numa.c
@@ -474,7 +474,8 @@
 		else
 			node_mem_map = NULL;
 
-		free_area_init_node(nid, NODE_DATA(nid), node_mem_map,
-				    zones_size, start_pfn, zholes_size);
+		NODE_DATA(nid)->node_mem_map = node_mem_map;
+		free_area_init_node(nid, NODE_DATA(nid), zones_size,
+				    start_pfn, zholes_size);
 	}
 }
arch/sh/mm/init.c +2 -2
diff -ru C-create-__boot-ppc64/arch/sh/mm/init.c D-init-no-mem_map/arch/sh/mm/init.c
@@ -215,7 +215,7 @@
 	disable_mmu();
 #endif
 
-	free_area_init_node(0, NODE_DATA(0), 0, zones_size, __MEMORY_START >> PAGE_SHIFT, 0);
+	free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0);
 	/* XXX: MRB-remove - this doesn't seem sane, should this be done somewhere else ?*/
 	mem_map = NODE_DATA(0)->node_mem_map;
 
@@ -225,7 +225,7 @@
 	 */
 	zones_size[ZONE_DMA] = __MEMORY_SIZE_2ND >> PAGE_SHIFT;
 	zones_size[ZONE_NORMAL] = 0;
-	free_area_init_node(1, NODE_DATA(1), 0, zones_size, __MEMORY_START_2ND >> PAGE_SHIFT, 0);
+	free_area_init_node(1, NODE_DATA(1), zones_size, __MEMORY_START_2ND >> PAGE_SHIFT, 0);
 #endif
 }
 
arch/sh64/mm/init.c +1 -1
diff -ru C-create-__boot-ppc64/arch/sh64/mm/init.c D-init-no-mem_map/arch/sh64/mm/init.c
@@ -123,7 +123,7 @@
          */
 	zones_size[ZONE_DMA] = MAX_LOW_PFN - START_PFN;
 
-	free_area_init_node(0, NODE_DATA(0), 0, zones_size, __MEMORY_START >> PAGE_SHIFT, 0);
+	free_area_init_node(0, NODE_DATA(0), zones_size, __MEMORY_START >> PAGE_SHIFT, 0);
 
 	/* XXX: MRB-remove - this doesn't seem sane, should this be done somewhere else ?*/
 	mem_map = NODE_DATA(0)->node_mem_map;
arch/sparc/mm/srmmu.c +1 -1
diff -ru C-create-__boot-ppc64/arch/sparc/mm/srmmu.c D-init-no-mem_map/arch/sparc/mm/srmmu.c
@@ -1341,7 +1341,7 @@
 		zones_size[ZONE_HIGHMEM] = npages;
 		zholes_size[ZONE_HIGHMEM] = npages - calc_highpages();
 
-		free_area_init_node(0, &contig_page_data, NULL, zones_size,
+		free_area_init_node(0, &contig_page_data, zones_size,
 				    pfn_base, zholes_size);
 		mem_map = contig_page_data.node_mem_map;
 	}
arch/sparc/mm/sun4c.c +1 -1
diff -ru C-create-__boot-ppc64/arch/sparc/mm/sun4c.c D-init-no-mem_map/arch/sparc/mm/sun4c.c
@@ -2114,7 +2114,7 @@
 		zones_size[ZONE_HIGHMEM] = npages;
 		zholes_size[ZONE_HIGHMEM] = npages - calc_highpages();
 
-		free_area_init_node(0, &contig_page_data, NULL, zones_size,
+		free_area_init_node(0, &contig_page_data, zones_size,
 				    pfn_base, zholes_size);
 		mem_map = contig_page_data.node_mem_map;
 	}
arch/sparc64/mm/init.c +1 -1
diff -ru C-create-__boot-ppc64/arch/sparc64/mm/init.c D-init-no-mem_map/arch/sparc64/mm/init.c
@@ -1585,7 +1585,7 @@
 		zones_size[ZONE_DMA] = npages;
 		zholes_size[ZONE_DMA] = npages - pages_avail;
 
-		free_area_init_node(0, &contig_page_data, NULL, zones_size,
+		free_area_init_node(0, &contig_page_data, zones_size,
 				    phys_base >> PAGE_SHIFT, zholes_size);
 		mem_map = contig_page_data.node_mem_map;
 	}
arch/v850/kernel/setup.c +1 -1
diff -ru C-create-__boot-ppc64/arch/v850/kernel/setup.c D-init-no-mem_map/arch/v850/kernel/setup.c
@@ -281,7 +281,7 @@
 #error MAX_ORDER is too large for given PAGE_OFFSET (use CONFIG_FORCE_MAX_ZONEORDER to change it)
 #endif
 
-	free_area_init_node (0, NODE_DATA(0), 0, zones_size,
+	free_area_init_node (0, NODE_DATA(0), zones_size,
 			     ADDR_TO_PAGE (PAGE_OFFSET), 0);
 	mem_map = NODE_DATA(0)->node_mem_map;
 }
arch/x86_64/mm/numa.c +1 -1
diff -ru C-create-__boot-ppc64/arch/x86_64/mm/numa.c D-init-no-mem_map/arch/x86_64/mm/numa.c
@@ -136,7 +136,7 @@
 		zones[ZONE_NORMAL] = end_pfn - start_pfn; 
 	} 
     
-	free_area_init_node(nodeid, NODE_DATA(nodeid), NULL, zones, 
+	free_area_init_node(nodeid, NODE_DATA(nodeid), zones, 
 			    start_pfn, NULL); 
 } 
 
include/linux/mm.h +2 -2
diff -ru C-create-__boot-ppc64/include/linux/mm.h D-init-no-mem_map/include/linux/mm.h
@@ -588,10 +588,10 @@
 }
 
 extern void free_area_init(unsigned long * zones_size);
-extern void free_area_init_node(int nid, pg_data_t *pgdat, struct page *pmap,
+extern void free_area_init_node(int nid, pg_data_t *pgdat,
 	unsigned long * zones_size, unsigned long zone_start_pfn, 
 	unsigned long *zholes_size);
-extern void memmap_init_zone(struct page *, unsigned long, int,
+extern void memmap_init_zone(unsigned long, int,
 	unsigned long, unsigned long);
 extern void mem_init(void);
 extern void show_mem(void);
mm/page_alloc.c +20 -17
diff -ru C-create-__boot-ppc64/mm/page_alloc.c D-init-no-mem_map/mm/page_alloc.c
@@ -1396,11 +1396,12 @@
  * up by free_all_bootmem() once the early boot process is
  * done. Non-atomic initialization, single-pass.
  */
-void __init memmap_init_zone(struct page *start, unsigned long size, int nid,
+void __init memmap_init_zone(unsigned long size, int nid,
 		unsigned long zone, unsigned long start_pfn)
 {
-	struct page *page;
+	struct page *page, *start;
 
+	start = pfn_to_page(start_pfn);
 	for (page = start; page < (start + size); page++) {
 		set_page_zone(page, NODEZONE(nid, zone));
 		set_page_count(page, 0);
@@ -1462,8 +1463,8 @@
 }
 
 #ifndef __HAVE_ARCH_MEMMAP_INIT
-#define memmap_init(start, size, nid, zone, start_pfn) \
-	memmap_init_zone((start), (size), (nid), (zone), (start_pfn))
+#define memmap_init(size, nid, zone, start_pfn) \
+	memmap_init_zone((size), (nid), (zone), (start_pfn))
 #endif
 
 /*
@@ -1478,7 +1479,6 @@
 	unsigned long i, j;
 	const unsigned long zone_required_alignment = 1UL << (MAX_ORDER-1);
 	int cpu, nid = pgdat->node_id;
-	struct page *lmem_map = pgdat->node_mem_map;
 	unsigned long zone_start_pfn = pgdat->node_start_pfn;
 
 	pgdat->nr_zones = 0;
@@ -1566,35 +1566,38 @@
 
 		pgdat->nr_zones = j+1;
 
-		zone->zone_mem_map = lmem_map;
+		zone->zone_mem_map = pfn_to_page(zone_start_pfn);
 		zone->zone_start_pfn = zone_start_pfn;
 
 		if ((zone_start_pfn) & (zone_required_alignment-1))
 			printk("BUG: wrong zone alignment, it will crash\n");
 
-		memmap_init(lmem_map, size, nid, j, zone_start_pfn);
+		memmap_init(size, nid, j, zone_start_pfn);
 
 		zone_start_pfn += size;
-		lmem_map += size;
 
 		zone_init_free_lists(pgdat, zone, zone->spanned_pages);
 	}
 }
 
-void __init free_area_init_node(int nid, struct pglist_data *pgdat,
-		struct page *node_mem_map, unsigned long *zones_size,
-		unsigned long node_start_pfn, unsigned long *zholes_size)
+void __init node_alloc_mem_map(struct pglist_data *pgdat)
 {
 	unsigned long size;
 
+	size = (pgdat->node_spanned_pages + 1) * sizeof(struct page);
+	pgdat->node_mem_map = alloc_bootmem_node(pgdat, size);
+}
+
+void __init free_area_init_node(int nid, struct pglist_data *pgdat,
+		unsigned long *zones_size, unsigned long node_start_pfn,
+		unsigned long *zholes_size)
+{
 	pgdat->node_id = nid;
 	pgdat->node_start_pfn = node_start_pfn;
 	calculate_zone_totalpages(pgdat, zones_size, zholes_size);
-	if (!node_mem_map) {
-		size = (pgdat->node_spanned_pages + 1) * sizeof(struct page);
-		node_mem_map = alloc_bootmem_node(pgdat, size);
-	}
-	pgdat->node_mem_map = node_mem_map;
+
+	if (!pfn_to_page(node_start_pfn))
+		node_alloc_mem_map(pgdat);
 
 	free_area_init_core(pgdat, zones_size, zholes_size);
 }
@@ -1607,7 +1610,7 @@
 
 void __init free_area_init(unsigned long *zones_size)
 {
-	free_area_init_node(0, &contig_page_data, NULL, zones_size,
+	free_area_init_node(0, &contig_page_data, zones_size,
 			__pa(PAGE_OFFSET) >> PAGE_SHIFT, NULL);
 	mem_map = contig_page_data.node_mem_map;
 }
#1 lore raw
Quoted 3 lines · Dave Hansen

Compile tested on SMP x86 and NUMAQ. I plan to give it a run on ppc64 in a bit. I'd appreciate if one of the ia64 guys could make sure it's OK for them as well.

It *looks* ok. I'll give it a whirl to make sure.

Jesse
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#2 lore raw
In reply to Dave Hansen
Quoted 3 lines · Dave Hansen

Compile tested on SMP x86 and NUMAQ. I plan to give it a run on ppc64 in a bit. I'd appreciate if one of the ia64 guys could make sure it's OK for them as well.

Which tree is this against? It doesn't apply to the bk tree or linux-2.6.8-rc2-mm1.

Thanks,
Jesse
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#3 lore raw
Quoted 7 lines · Jesse Barnes
Quoted 3 lines · Dave Hansen

Compile tested on SMP x86 and NUMAQ. I plan to give it a run on ppc64 in a bit. I'd appreciate if one of the ia64 guys could make sure it's OK for them as well.

Which tree is this against? It doesn't apply to the bk tree or linux-2.6.8-rc2-mm1.

Put this one before it, and it should apply cleanly. I posted this one earlier today, and didn't realize that the new one was dependent.

-- Dave

Only in A-zoneinit_cleanup/arch/i386/kernel: .semaphore.o.cmd Only in A-zoneinit_cleanup/arch/i386/kernel: semaphore.o Only in ../linux-2.6.8-rc2-mm1/arch/i386/mm: .init.o.d Only in ../linux-2.6.8-rc2-mm1/arch/i386/mm: .init.o.tmp

include/linux/compile.h renamed from linux-2.6.8-rc2-mm1/include/linux/compile.h +2 -2
diff -ur ../linux-2.6.8-rc2-mm1/include/linux/compile.h A-zoneinit_cleanup/include/linux/compile.h
@@ -1,7 +1,7 @@
 /* This file is auto generated, version 0 */
 #define UTS_MACHINE "i386"
-#define UTS_VERSION "#0 SMP Wed Jul 28 13:15:16 PDT 2004"
-#define LINUX_COMPILE_TIME "13:15:16"
+#define UTS_VERSION "#0 SMP Wed Jul 28 13:14:33 PDT 2004"
+#define LINUX_COMPILE_TIME "13:14:33"
 #define LINUX_COMPILE_BY "root"
 #define LINUX_COMPILE_HOST "elm3b82"
 #define LINUX_COMPILE_DOMAIN "eng.beaverton.ibm.com"

Only in ../linux-2.6.8-rc2-mm1/init: .do_mounts.o.cmd Only in ../linux-2.6.8-rc2-mm1/init: .initramfs.o.d Only in ../linux-2.6.8-rc2-mm1/init: .version.o.cmd Only in ../linux-2.6.8-rc2-mm1/init: do_mounts.o Only in ../linux-2.6.8-rc2-mm1/init: version.o

mm/page_alloc.c renamed from linux-2.6.8-rc2-mm1/mm/page_alloc.c +47 -37

96 lines not on this page · raw message

Binary files ../linux-2.6.8-rc2-mm1/usr/built-in.o and A-zoneinit_cleanup/usr/built-in.o differ Binary files ../linux-2.6.8-rc2-mm1/usr/initramfs_data.cpio and A-zoneinit_cleanup/usr/initramfs_data.cpio differ Binary files ../linux-2.6.8-rc2-mm1/usr/initramfs_data.cpio.gz and A-zoneinit_cleanup/usr/initramfs_data.cpio.gz differ Binary files ../linux-2.6.8-rc2-mm1/usr/initramfs_data.o and A-zoneinit_cleanup/usr/initramfs_data.o differ

#4 lore raw
Quoted 11 lines · Dave Hansen
Quoted 7 lines · Jesse Barnes
Quoted 3 lines · Dave Hansen

Compile tested on SMP x86 and NUMAQ. I plan to give it a run on ppc64 in a bit. I'd appreciate if one of the ia64 guys could make sure it's OK for them as well.

Which tree is this against? It doesn't apply to the bk tree or linux-2.6.8-rc2-mm1.

Put this one before it, and it should apply cleanly. I posted this one earlier today, and didn't realize that the new one was dependent.

You're missing this little bit from your patchset. Cc'ing Tony and David.

Jesse

arch/ia64/mm/init.c +5 -2
diff -Napur -X /home/jbarnes/dontdiff linux-2.5-memmap.orig/arch/ia64/mm/init.c linux-2.5-memmap/arch/ia64/mm/init.c
@@ -433,14 +433,17 @@ virtual_memmap_init (u64 start, u64 end,
 }
 
 void
-memmap_init (struct page *start, unsigned long size, int nid,
-	     unsigned long zone, unsigned long start_pfn)
+memmap_init (unsigned long size, int nid, unsigned long zone,
+	     unsigned long start_pfn)
 {
 	if (!vmem_map)
 		memmap_init_zone(size, nid, zone, start_pfn);
 	else {
+		struct page *start;
 		struct memmap_init_callback_data args;
 
+		start = pfn_to_page(start_pfn);
+
 		args.start = start;
 		args.end = start + size;
 		args.nid = nid;
include/asm-ia64/pgtable.h +1 -1
diff -Napur -X /home/jbarnes/dontdiff linux-2.5-memmap.orig/include/asm-ia64/pgtable.h linux-2.5-memmap/include/asm-ia64/pgtable.h
@@ -515,7 +515,7 @@ do {											\
 #  ifdef CONFIG_VIRTUAL_MEM_MAP
   /* arch mem_map init routine is needed due to holes in a virtual mem_map */
 #   define __HAVE_ARCH_MEMMAP_INIT
-    extern void memmap_init (struct page *start, unsigned long size, int nid, unsigned long zone,
+    extern void memmap_init (unsigned long size, int nid, unsigned long zone,
 			     unsigned long start_pfn);
 #  endif /* CONFIG_VIRTUAL_MEM_MAP */
 # endif /* !__ASSEMBLY__ */
#6 lore raw
Quoted 6 lines · Dave Hansen
Quoted 2 lines · Jesse Barnes

You're missing this little bit from your patchset. Cc'ing Tony and David.

Thanks for finding that. That appears to be an ia64-ism, so I think the rest of the patch is OK.

Well, it booted anyway :). I didn't check to see if any other arches had their own memmap_init routines though, I'm assuming you already covered those.

Jesse
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#7 lore raw
In reply to Dave Hansen

Martin,

I think that zone init code is yours from the initial CONFIG_NUMA port and the kva remap code. Do you think it's ready to go upstream? If so, do you want to send it, or should I?

It works on the NUMAQ, on regular SMP and Jesse Barnes tested it too.

-- Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>

#8 lore raw
Quoted 5 lines

I think that zone init code is yours from the initial CONFIG_NUMA port and the kva remap code. Do you think it's ready to go upstream? If so, do you want to send it, or should I?

It works on the NUMAQ, on regular SMP and Jesse Barnes tested it too.

Which bit of the zone_init code are we talking about? the re-ordering you did? If so, that looked OK, but I'd like to test it on the x440 as well, I'll power that up this morning and test it.

M.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>