]> Git Repo - linux.git/commitdiff
[PATCH] oprofile: Use vmalloc_node() in alloc_cpu_buffers()
authorEric Dumazet <[email protected]>
Sun, 8 Jan 2006 09:03:21 +0000 (01:03 -0800)
committerLinus Torvalds <[email protected]>
Mon, 9 Jan 2006 04:13:56 +0000 (20:13 -0800)
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]>
drivers/oprofile/cpu_buffer.c

index 026f671ea55870bcecfe82e510004d33967eb5ad..78193e4bbdb564981a98b00437bdad6a8b851500 100644 (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;
  
This page took 0.049248 seconds and 4 git commands to generate.