* [patch 202/203] numa: in-kernel profiling: use cpu_to_mem() for per cpu allocations
@ 2010-05-26 21:45 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2010-05-26 21:45 UTC (permalink / raw)
To: torvalds
Cc: akpm, lee.schermerhorn, cl, eric.whitney, hpa, kamezawa.hiroyu,
linux-arch, mel, mingo, npiggin, penberg, rientjes, tglx, tj,
tony.luck
From: Lee Schermerhorn <lee.schermerhorn@hp.com>
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>
---
kernel/profile.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff -puN kernel/profile.c~numa-in-kernel-profiling-use-cpu_to_mem-for-per-cpu-allocations kernel/profile.c
--- a/kernel/profile.c~numa-in-kernel-profiling-use-cpu_to_mem-for-per-cpu-allocations
+++ a/kernel/profile.c
@@ -365,7 +365,7 @@ static int __cpuinit profile_cpu_callbac
switch (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,
_
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-05-26 21:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-26 21:45 [patch 202/203] numa: in-kernel profiling: use cpu_to_mem() for per cpu allocations akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.