[1/9] NUMA-Q: initialize pgdat_list later in boot

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


In order to remove the assumption pgdat's off of node 0 are mapped
early, this patch moves the linking of the pgdats off node 0 into
the pgdat_list into zone_sizes_init().

There is also the cosmetic side-effect of ordering the nodes in a
manner consistent with usual notions of their enumeration.

discontig.c | 17 ++++++++++-------
1 files changed, 10 insertions(+), 7 deletions(-)

diff -urpN numaq-2.5.47/arch/i386/mm/discontig.c 00_late_list/arch/i386/mm/discontig.c
--- numaq-2.5.47/arch/i386/mm/discontig.c 2002-11-10 19:28:17.000000000 -0800
+++ 00_late_list/arch/i386/mm/discontig.c 2002-11-11 16:13:57.000000000 -0800
@@ -251,13 +251,6 @@ unsigned long __init setup_memory(void)
*/
find_smp_config();

- /*insert other nodes into pgdat_list*/
- for (nid = 1; nid < numnodes; nid++){
- NODE_DATA(nid)->pgdat_next = pgdat_list;
- pgdat_list = NODE_DATA(nid);
- }
-
-
#ifdef CONFIG_BLK_DEV_INITRD
if (LOADER_TYPE && INITRD_START) {
if (INITRD_START + INITRD_SIZE <= (system_max_low_pfn << PAGE_SHIFT)) {
@@ -282,6 +275,16 @@ void __init zone_sizes_init(void)
{
int nid;

+ /*
+ * Insert nodes into pgdat_list backward so they appear in order.
+ * Clobber node 0's links and NULL out pgdat_list before starting.
+ */
+ pgdat_list = NULL;
+ for (nid = numnodes - 1; nid >= 0; nid--) {
+ NODE_DATA(nid)->pgdat_next = pgdat_list;
+ pgdat_list = NODE_DATA(nid);
+ }
+
for (nid = 0; nid < numnodes; nid++) {
unsigned long zones_size[MAX_NR_ZONES] = {0, 0, 0};
unsigned int max_dma;
-
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/