[2/9] NUMA-Q: memset pgdats later in boot

William Lee Irwin III (wli@holomorphy.com)
Mon, 11 Nov 2002 18:20:20 -0800


In order to remove the assumption that pgdats for nodes > 0 are mapped
early, this patch moves the process of memset()'ing a node's pgdat into
zone_sizes_init(), just before they're to be linked.

discontig.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletion(-)

diff -urpN 00_late_list/arch/i386/mm/discontig.c 01_late_memset/arch/i386/mm/discontig.c
--- 00_late_list/arch/i386/mm/discontig.c 2002-11-11 16:13:57.000000000 -0800
+++ 01_late_memset/arch/i386/mm/discontig.c 2002-11-11 16:21:37.000000000 -0800
@@ -70,7 +70,8 @@ static void __init allocate_pgdat(int ni
node_datasz = PFN_UP(sizeof(struct pglist_data));
NODE_DATA(nid) = (pg_data_t *)(__va(min_low_pfn << PAGE_SHIFT));
min_low_pfn += node_datasz;
- memset(NODE_DATA(nid), 0, sizeof(struct pglist_data));
+ if (!nid)
+ memset(NODE_DATA(nid), 0, sizeof(pg_data_t));
}

/*
@@ -281,6 +282,8 @@ void __init zone_sizes_init(void)
*/
pgdat_list = NULL;
for (nid = numnodes - 1; nid >= 0; nid--) {
+ if (nid)
+ memset(NODE_DATA(nid), 0, sizeof(pg_data_t));
NODE_DATA(nid)->pgdat_next = pgdat_list;
pgdat_list = NODE_DATA(nid);
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/