Skip to content

Commit

Permalink
devm_memremap_pages: use numa_mem_id
Browse files Browse the repository at this point in the history
Hint to closest numa node for the placement of newly allocated pages.
As that is where the device's other allocations will originate by
default when it does not specify a NUMA node.

Cc: Ross Zwisler <[email protected]>
Reviewed-by: Tejun Heo <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
  • Loading branch information
djbw committed Oct 9, 2015
1 parent 7c68394 commit 7eff93b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/memremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void *devm_memremap_pages(struct device *dev, struct resource *res)

nid = dev_to_node(dev);
if (nid < 0)
nid = 0;
nid = numa_mem_id();

error = arch_add_memory(nid, res->start, resource_size(res), true);
if (error) {
Expand Down

0 comments on commit 7eff93b

Please sign in to comment.