numa: in-kernel profiling: use cpu_to_mem() for per cpu allocations
PATCH 202/203 numa: in-kernel profiling: use cpu_to_mem() for per cpu allocations
From: Lee Schermerhorn <[email protected]>
In kernel profiling requires that we be able to allocate "local" memory for each cpu. Use "cpu_to_mem()" instead of "cpu_to_node()" to support memoryless nodes.
Depends on the "numa_mem_id()" patch.
Signed-off-by Lee Schermerhorn <[email protected]>
Cc Tejun Heo <[email protected]>
Cc Mel Gorman <[email protected]>
Cc Christoph Lameter <[email protected]>
Cc Nick Piggin <[email protected]>
Cc David Rientjes <[email protected]>
Cc Eric Whitney <[email protected]>
Cc KAMEZAWA Hiroyuki <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc "H. Peter Anvin" <[email protected]>
Cc "Luck, Tony" <[email protected]>
Cc Pekka Enberg <[email protected]>
Cc <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
kernel/profile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/profile.c renamed from kernel/profile.c~numa-in-kernel-profiling-use-cpu_to_mem-for-per-cpu-allocations +2 -2
@@ -365,7 +365,7 @@ static int __cpuinit profile_cpu_callbacswitch (action) {case CPU_UP_PREPARE :case CPU_UP_PREPARE_FROZEN : - node =cpu_to_node (cpu); + node =cpu_to_mem (cpu);per_cpu (cpu_profile_flip, cpu) =0 ;if (!per_cpu (cpu_profile_hits, cpu)[1 ]) { page = alloc_pages_exact_node(node,
@@ -567,7 +567,7 @@ static int create_hash_tables(void)int cpu;for_each_online_cpu (cpu) { -int node =cpu_to_node (cpu); +int node =cpu_to_mem (cpu);struct page *page; page = alloc_pages_exact_node(node,
_