diff options
author | Lee Schermerhorn <lee.schermerhorn@hp.com> | 2010-05-26 17:45:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 12:12:57 -0400 |
commit | 3dd6b5fb436083fdd8af7ad2baa07db19deb73b2 (patch) | |
tree | 9c97bccad863663e36224e96b00f00b5a7dbaea6 /kernel/profile.c | |
parent | 7d6e6d09de82cf6cff7fecdba55198b9f47b381c (diff) |
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: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Nick Piggin <npiggin@suse.de>
Cc: David Rientjes <rientjes@google.com>
Cc: Eric Whitney <eric.whitney@hp.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: <linux-arch@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/profile.c')
-rw-r--r-- | kernel/profile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/profile.c b/kernel/profile.c index 1e6a0d94ea63..b22a899934cc 100644 --- a/kernel/profile.c +++ b/kernel/profile.c | |||
@@ -365,7 +365,7 @@ static int __cpuinit profile_cpu_callback(struct notifier_block *info, | |||
365 | switch (action) { | 365 | switch (action) { |
366 | case CPU_UP_PREPARE: | 366 | case CPU_UP_PREPARE: |
367 | case CPU_UP_PREPARE_FROZEN: | 367 | case CPU_UP_PREPARE_FROZEN: |
368 | node = cpu_to_node(cpu); | 368 | node = cpu_to_mem(cpu); |
369 | per_cpu(cpu_profile_flip, cpu) = 0; | 369 | per_cpu(cpu_profile_flip, cpu) = 0; |
370 | if (!per_cpu(cpu_profile_hits, cpu)[1]) { | 370 | if (!per_cpu(cpu_profile_hits, cpu)[1]) { |
371 | page = alloc_pages_exact_node(node, | 371 | page = alloc_pages_exact_node(node, |
@@ -567,7 +567,7 @@ static int create_hash_tables(void) | |||
567 | int cpu; | 567 | int cpu; |
568 | 568 | ||
569 | for_each_online_cpu(cpu) { | 569 | for_each_online_cpu(cpu) { |
570 | int node = cpu_to_node(cpu); | 570 | int node = cpu_to_mem(cpu); |
571 | struct page *page; | 571 | struct page *page; |
572 | 572 | ||
573 | page = alloc_pages_exact_node(node, | 573 | page = alloc_pages_exact_node(node, |