[PATCH 1/1] memoryless: actually set node_states[N_HIGH_MEMORY]
From: sergeh
Date: Tue Aug 14 2007 - 16:47:51 EST
If CONFIG_NODES_SHIFT is unset, then MAX_NUMNODES=1, and
node_set_state() does nothing. This means that __build_all_zonelists()
does not actually set node_states[N_HIGH_MEMORY]. cpusets needs
node_states[N_HIGH_MEMORY] to be correctly set, or it will raise a
bug when a new cpuset is created.
Switch to using node_set() in __build_all_zonelists() to
make sure it is actually set.
Note there are other calls to node_set_state() in mm/page_alloc.c,
which perhaps should also be modified. Since this area is completely
foreign to me I thought I'd first make sure this is the right approach.
Signed-off-by: Serge E. Hallyn <serue@xxxxxxxxxx>
Signed-off-by: Dhaval Giani <dhaval@xxxxxxxxxxxxxxxxxx>
---
mm/page_alloc.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 1a40099..111e311 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2443,7 +2443,7 @@ static int __build_all_zonelists(void *dummy)
/* Any memory on that node */
if (pgdat->node_present_pages)
- node_set_state(nid, N_HIGH_MEMORY);
+ node_set(nid, node_states[N_HIGH_MEMORY]);
check_for_regular_memory(pgdat);
}
return 0;
--
1.5.1
-
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/