From: Eric Dumazet Date: Sun, 8 Jan 2006 09:03:21 +0000 (-0800) Subject: [PATCH] oprofile: Use vmalloc_node() in alloc_cpu_buffers() X-Git-Tag: v2.6.16-rc1~757 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=25ab7cd84eebdc1869d236029ada3a7b403de8ba;p=linux-2.6 [PATCH] oprofile: Use vmalloc_node() in alloc_cpu_buffers() 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 Signed-off-by: Linus Torvalds --- diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c index 026f671ea5..78193e4bbd 100644 --- a/drivers/oprofile/cpu_buffer.c +++ b/drivers/oprofile/cpu_buffer.c @@ -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;