Messages in this thread Patch in this message | | | Date | Fri, 25 Nov 2005 14:36:11 +0100 | From | Eric Dumazet <> | Subject | [PATCH] oprofile : Use vmalloc_node() in alloc_cpu_buffers() |
| |
This small patch makes 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>
--- linux-2.6-orig/drivers/oprofile/cpu_buffer.c 2005-11-25 10:24:00.000000000 +0100 +++ linux-2.6/drivers/oprofile/cpu_buffer.c 2005-11-25 14:29:04.000000000 +0100 @@ -52,7 +52,8 @@ 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; | |