aboutsummaryrefslogtreecommitdiffstats
path: root/mm/mm_init.c
diff options
context:
space:
mode:
authorMel Gorman <mel@csn.ul.ie>2008-07-24 00:26:52 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 13:47:14 -0400
commit68ad8df42e12037c3894c9706ab428bf5cd6426b (patch)
tree42999fc8e3cbf400b6133f832f310690f8f28b76 /mm/mm_init.c
parent2dbb51c49f4fecb8330e43247a0edfbc4b2b8974 (diff)
mm: print out the zonelists on request for manual verification
This patch prints out the zonelists during boot for manual verification by the user if the mminit_loglevel is MMINIT_VERIFY or higher. Signed-off-by: Mel Gorman <mel@csn.ul.ie> Cc: Christoph Lameter <cl@linux-foundation.org> Cc: Andy Whitcroft <apw@shadowen.org> Cc: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/mm_init.c')
-rw-r--r--mm/mm_init.c45
1 files changed, 45 insertions, 0 deletions
diff --git a/mm/mm_init.c b/mm/mm_init.c
index e16990d629e6..ce445ca097e7 100644
--- a/mm/mm_init.c
+++ b/mm/mm_init.c
@@ -11,6 +11,51 @@
11 11
12int __meminitdata mminit_loglevel; 12int __meminitdata mminit_loglevel;
13 13
14/* The zonelists are simply reported, validation is manual. */
15void mminit_verify_zonelist(void)
16{
17 int nid;
18
19 if (mminit_loglevel < MMINIT_VERIFY)
20 return;
21
22 for_each_online_node(nid) {
23 pg_data_t *pgdat = NODE_DATA(nid);
24 struct zone *zone;
25 struct zoneref *z;
26 struct zonelist *zonelist;
27 int i, listid, zoneid;
28
29 BUG_ON(MAX_ZONELISTS > 2);
30 for (i = 0; i < MAX_ZONELISTS * MAX_NR_ZONES; i++) {
31
32 /* Identify the zone and nodelist */
33 zoneid = i % MAX_NR_ZONES;
34 listid = i / MAX_NR_ZONES;
35 zonelist = &pgdat->node_zonelists[listid];
36 zone = &pgdat->node_zones[zoneid];
37 if (!populated_zone(zone))
38 continue;
39
40 /* Print information about the zonelist */
41 printk(KERN_DEBUG "mminit::zonelist %s %d:%s = ",
42 listid > 0 ? "thisnode" : "general", nid,
43 zone->name);
44
45 /* Iterate the zonelist */
46 for_each_zone_zonelist(zone, z, zonelist, zoneid) {
47#ifdef CONFIG_NUMA
48 printk(KERN_CONT "%d:%s ",
49 zone->node, zone->name);
50#else
51 printk(KERN_CONT "0:%s ", zone->name);
52#endif /* CONFIG_NUMA */
53 }
54 printk(KERN_CONT "\n");
55 }
56 }
57}
58
14void __init mminit_verify_pageflags_layout(void) 59void __init mminit_verify_pageflags_layout(void)
15{ 60{
16 int shift, width; 61 int shift, width;