[PATCH 1/2] zone init check and report unaligned zone boundaries fix

From: Andy Whitcroft
Date: Thu May 18 2006 - 11:55:10 EST


zone init check and report unaligned zone boundaries fix v2

We are reporting bad boundaries for the first zone which is allowed
to be missaligned because nodes are not allowed to be missaligned,
and zones which have zero size. Cull them.

Signed-off-by: Andy Whitcroft <apw@xxxxxxxxxxxx>
---
page_alloc.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff -upN reference/mm/page_alloc.c current/mm/page_alloc.c
--- reference/mm/page_alloc.c
+++ current/mm/page_alloc.c
@@ -2223,10 +2223,6 @@ static void __meminit free_area_init_cor
struct zone *zone = pgdat->node_zones + j;
unsigned long size, realsize;

- if (zone_boundary_align_pfn(zone_start_pfn) != zone_start_pfn)
- printk(KERN_CRIT "node %d zone %s missaligned "
- "start pfn\n", nid, zone_names[j]);
-
realsize = size = zones_size[j];
if (zholes_size)
realsize -= zholes_size[j];
@@ -2235,6 +2231,11 @@ static void __meminit free_area_init_cor
nr_kernel_pages += realsize;
nr_all_pages += realsize;

+ if (zone_boundary_align_pfn(zone_start_pfn) !=
+ zone_start_pfn && j != 0 && size != 0)
+ printk(KERN_CRIT "node %d zone %s missaligned "
+ "start pfn\n", nid, zone_names[j]);
+
zone->spanned_pages = size;
zone->present_pages = realsize;
zone->name = zone_names[j];
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/