Skip to content

Commit

Permalink
[PATCH] oprofile: Use vmalloc_node() in alloc_cpu_buffers()
Browse files Browse the repository at this point in the history
Make oprofile alloc_cpu_buffers() function NUMA aware, allocating each CPU
local buffer in its memory node if possible.

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>
Cc: Philippe Elie <phil.el@wanadoo.fr>
Cc: John Levon <levon@movementarian.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Eric Dumazet authored and Linus Torvalds committed Jan 9, 2006
1 parent 71b9625 commit 25ab7cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/oprofile/cpu_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 25ab7cd

Please sign in to comment.