Commit 3dd6b5fb authored by Lee Schermerhorn's avatar Lee Schermerhorn Committed by Linus Torvalds
Browse files

numa: in-kernel profiling: use cpu_to_mem() for per cpu allocations

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: default avatarLee Schermerhorn <>
Cc: Tejun Heo <>
Cc: Mel Gorman <>
Cc: Christoph Lameter <>
Cc: Nick Piggin <>
Cc: David Rientjes <>
Cc: Eric Whitney <>
Cc: KAMEZAWA Hiroyuki <>
Cc: Ingo Molnar <>
Cc: Thomas Gleixner <>
Cc: "H. Peter Anvin" <>
Cc: "Luck, Tony" <>
Cc: Pekka Enberg <>
Cc: <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 7d6e6d09
......@@ -365,7 +365,7 @@ static int __cpuinit profile_cpu_callback(struct notifier_block *info,
switch (action) {
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,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment