[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 <[email protected]>
Cc: Philippe Elie <[email protected]>
Cc: John Levon <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Eric Dumazet 2006-01-08 01:03:21 -08:00 • committed by Linus Torvalds
commit 25ab7cd84e

View file

@ -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;