NUMA-Q: mem_map placement
PATCH 6/9 NUMA-Q: mem_map placement
This moves the allocation of the local memory maps (accomplished by passing the virtual address of the virtual remapped arena) so that there is a gap of size (sizeof(pg_data_t) + PAGE_SIZE - 1) & PAGE_MASK between node_remap_start_vaddr[nid] and NODE_DATA(nid)->node_mem_map.
discontig.c | 15 ++++++++++----- 1 files changed, 10 insertions(+), 5 deletions(-)
arch/i386/mm/discontig.c +10 -5
@@ -318,13 +318,18 @@ void __init zone_sizes_init(void)* normal bootmem allocator, but other nodes come from the * remapped KVA area - mbligh */ -if (nid) -free_area_init_node (nid,NODE_DATA (nid), - node_remap_start_vaddr[nid], zones_size, - start,0 ); -else +if (!nid)free_area_init_node (nid,NODE_DATA (nid),0 , zones_size, start,0 ); +else { +unsigned long lmem_map; + lmem_map = (unsigned long )node_remap_start_vaddr[nid]; + lmem_map +=sizeof (pg_data_t) +PAGE_SIZE -1 ; + lmem_map &=PAGE_MASK ; +free_area_init_node (nid,NODE_DATA (nid), + (struct page *)lmem_map, zones_size, + start,0 ); + } }return ; }