aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-09-12 12:49:24 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-12 13:49:56 -0400
commit5d3d0f7704ed0bc7eaca0501eeae3e5da1ea6c87 (patch)
tree7f1f41450a6f1880488f7fd4554a1f2bbd71d391
parent6142891a0c0209c91aa4a98f725de0d6e2ed4918 (diff)
[PATCH] x86-64: Reverse order of bootmem lists
This leads to bootmem allocating first from node 0 instead of from the last node. This avoids swiotlb allocating on the last node, which doesn't really work on a machine with >4GB. Note: there is a better patch around from someone else that gets rid of the pgdat list completely. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r--mm/bootmem.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/mm/bootmem.c b/mm/bootmem.c
index c1330cc19783..8ec4e4c2a179 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -61,9 +61,17 @@ static unsigned long __init init_bootmem_core (pg_data_t *pgdat,
61{ 61{
62 bootmem_data_t *bdata = pgdat->bdata; 62 bootmem_data_t *bdata = pgdat->bdata;
63 unsigned long mapsize = ((end - start)+7)/8; 63 unsigned long mapsize = ((end - start)+7)/8;
64 64 static struct pglist_data *pgdat_last;
65 pgdat->pgdat_next = pgdat_list; 65
66 pgdat_list = pgdat; 66 pgdat->pgdat_next = NULL;
67 /* Add new nodes last so that bootmem always starts
68 searching in the first nodes, not the last ones */
69 if (pgdat_last)
70 pgdat_last->pgdat_next = pgdat;
71 else {
72 pgdat_list = pgdat;
73 pgdat_last = pgdat;
74 }
67 75
68 mapsize = ALIGN(mapsize, sizeof(long)); 76 mapsize = ALIGN(mapsize, sizeof(long));
69 bdata->node_bootmem_map = phys_to_virt(mapstart << PAGE_SHIFT); 77 bdata->node_bootmem_map = phys_to_virt(mapstart << PAGE_SHIFT);