NUMA-Q: allocate pgdats from node-local memory
PATCH 7/9 NUMA-Q: allocate pgdats from node-local memory
This changes allocate_pgdat() to hand back virtual addresses of pgdats from the start of node_remap_start_vaddr[nid].
discontig.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
arch/i386/mm/discontig.c +6 -6
@@ -73,13 +73,13 @@ static void __init find_max_pfn_node(int*/ static void __init allocate_pgdat (int nid) { -unsigned long node_datasz; - - 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; -if (!nid) +if (nid) +NODE_DATA (nid) = (pg_data_t *)node_remap_start_vaddr[nid]; +else { +NODE_DATA (nid) = (pg_data_t *)(__va (min_low_pfn <<PAGE_SHIFT )); + min_low_pfn +=PFN_UP (sizeof (pg_data_t));memset (NODE_DATA (nid),0 ,sizeof (pg_data_t)); + } }/*