Skip to content

Commit

Permalink
x86: cope with no remap space being allocated for a numa node
Browse files Browse the repository at this point in the history
When allocating the pgdat's for numa nodes on x86_32 we attempt to place
them in the numa remap space for that node.  However should the node not
have any remap space allocated (such as due to having non-ram pages in
the remap location in the node) then we will incorrectly place the pgdat
at zero.  Check we have remap available, falling back to node 0 memory
where we do not.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Andy Whitcroft authored and Ingo Molnar committed May 20, 2008
1 parent b9ada42 commit 84d6bd0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/mm/discontig_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ static void __init propagate_e820_map_node(int nid)
*/
static void __init allocate_pgdat(int nid)
{
if (nid && node_has_online_mem(nid))
if (nid && node_has_online_mem(nid) && node_remap_start_vaddr[nid])
NODE_DATA(nid) = (pg_data_t *)node_remap_start_vaddr[nid];
else {
NODE_DATA(nid) = (pg_data_t *)(pfn_to_kaddr(min_low_pfn));
Expand Down

0 comments on commit 84d6bd0

Please sign in to comment.