From: Eric Dumazet Make oprofile alloc_cpu_buffers() function NUMA aware, allocating each CPU local buffer in its memory node if possible. Signed-off-by: Eric Dumazet Cc: Philippe Elie Cc: John Levon Signed-off-by: Andrew Morton --- drivers/oprofile/cpu_buffer.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/oprofile/cpu_buffer.c~oprofile-use-vmalloc_node-in-alloc_cpu_buffers drivers/oprofile/cpu_buffer.c --- devel/drivers/oprofile/cpu_buffer.c~oprofile-use-vmalloc_node-in-alloc_cpu_buffers 2005-11-26 22:22:55.000000000 -0800 +++ devel-akpm/drivers/oprofile/cpu_buffer.c 2005-11-26 22:22:55.000000000 -0800 @@ -52,7 +52,8 @@ int alloc_cpu_buffers(void) for_each_online_cpu(i) { struct oprofile_cpu_buffer * b = &cpu_buffer[i]; - b->buffer = vmalloc(sizeof(struct op_sample) * buffer_size); + b->buffer = vmalloc_node(sizeof(struct op_sample) * buffer_size, + cpu_to_node(i)); if (!b->buffer) goto fail; _