mirror of
https://github.com/fail0verflow/switch-linux.git
synced 2025-05-04 02:34:21 -04:00
[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 <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>
This commit is contained in:
parent
71b9625744
commit
25ab7cd84e
1 changed files with 2 additions and 1 deletions
|
@ -52,7 +52,8 @@ int alloc_cpu_buffers(void)
|
||||||
for_each_online_cpu(i) {
|
for_each_online_cpu(i) {
|
||||||
struct oprofile_cpu_buffer * b = &cpu_buffer[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)
|
if (!b->buffer)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue