x86-64, NUMA: Seperate out numa_alloc_distance() from numa_set_distance()
authorYinghai Lu <yinghai@kernel.org>
Tue, 22 Feb 2011 10:18:49 +0000 (11:18 +0100)
committerTejun Heo <tj@kernel.org>
Tue, 22 Feb 2011 10:18:49 +0000 (11:18 +0100)
commit2bf50555b0920be7e29d3823f6bbd20ee5920489
tree43d1a7b547af3e87c18543caff7b398be66413d2
parent90e6b677b47ff8c5ba1637941af6b9f92723b003
x86-64, NUMA: Seperate out numa_alloc_distance() from numa_set_distance()

Alloc code is much bigger the distance setting.  Separate it out into
numa_alloc_distance() for readability.

-v2: Let alloc_numa_distance to return -ENOMEM on failing path,
     requested by tj.

-tj: Description update.  Minor tweaks including function name,
     location and return value check.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
arch/x86/mm/numa_64.c