login
Header Space

 
 

Re: parisc DISCONTIGMEM compile breakage

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Mel Gorman <mel@...>
Cc: Adrian Bunk <bunk@...>, Christoph Lameter <clameter@...>, Lee Schermerhorn <lee.schermerhorn@...>, <kyle@...>, <matthew@...>, <grundler@...>, <linux-parisc@...>, <linux-kernel@...>
Date: Tuesday, May 6, 2008 - 3:58 pm

On Tue, 2008-05-06 at 16:27 +0100, Mel Gorman wrote:

This rather doesn't look right.  The intent is for i to iterate over the
ranges (as nodes) and j to iterate over the zones to get the zonelist.
The original variable k was going over the mappings, which you replaced
with for_each_zone_zonelist.  If you use node_zonelist(i, 0) you don't
really look at the actual zones in the map.

Therefore it seems what will give the original functionality back is
actually this:

James

diff --git a/arch/parisc/mm/init.c b/arch/parisc/mm/init.c
index 1f01284..7bc286d 100644
--- a/arch/parisc/mm/init.c
+++ b/arch/parisc/mm/init.c
@@ -602,15 +602,16 @@ void show_mem(void)
 
 #ifdef CONFIG_DISCONTIGMEM
 	{
-		struct zonelist *zl;
 		int i, j;
 
 		for (i = 0; i < npmem_ranges; i++) {
-			zl = node_zonelist(i);
 			for (j = 0; j < MAX_NR_ZONES; j++) {
+				struct zonelist *zl;
 				struct zoneref *z;
 				struct zone *zone;
 
+				zl = NODE_DATA(i)->node_zonelists + j;
+
 				printk("Zone list for zone %d on node %d: ", j, i);
 				for_each_zone_zonelist(zone, z, zl, j)
 					printk("[%d/%s] ", zone_to_nid(zone),


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
parisc DISCONTIGMEM compile breakage, Adrian Bunk, (Tue May 6, 9:46 am)
Re: parisc DISCONTIGMEM compile breakage, Mel Gorman, (Tue May 6, 11:27 am)
Re: parisc DISCONTIGMEM compile breakage, James Bottomley, (Tue May 6, 3:58 pm)
Re: parisc DISCONTIGMEM compile breakage, Mel Gorman, (Tue May 6, 5:17 pm)
Re: parisc DISCONTIGMEM compile breakage, James Bottomley, (Tue May 6, 6:09 pm)
Re: parisc DISCONTIGMEM compile breakage, Christoph Lameter, (Tue May 6, 1:54 pm)
Re: parisc DISCONTIGMEM compile breakage, Kyle McMartin, (Tue May 6, 11:24 am)
Re: parisc DISCONTIGMEM compile breakage, Mel Gorman, (Tue May 6, 11:49 am)
speck-geostationary