Commit 25ab7cd8 authored by Eric Dumazet's avatar Eric Dumazet Committed by Linus Torvalds
Browse files

[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: default avatarEric Dumazet <>
Cc: Philippe Elie <>
Cc: John Levon <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent 71b96257
......@@ -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,
if (!b->buffer)
goto fail;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment