diff options
author | Eric Dumazet <dada1@cosmosbay.com> | 2006-01-08 04:03:21 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-08 23:13:56 -0500 |
commit | 25ab7cd84eebdc1869d236029ada3a7b403de8ba (patch) | |
tree | 4308545d06f89c50c9dbe9cd6575a2b049a16a32 | |
parent | 71b9625744b7d4a6a2416389a5ba464bdf11f07f (diff) |
[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>
-rw-r--r-- | drivers/oprofile/cpu_buffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c index 026f671ea558..78193e4bbdb5 100644 --- a/drivers/oprofile/cpu_buffer.c +++ b/drivers/oprofile/cpu_buffer.c | |||
@@ -52,7 +52,8 @@ int alloc_cpu_buffers(void) | |||
52 | for_each_online_cpu(i) { | 52 | for_each_online_cpu(i) { |
53 | struct oprofile_cpu_buffer * b = &cpu_buffer[i]; | 53 | struct oprofile_cpu_buffer * b = &cpu_buffer[i]; |
54 | 54 | ||
55 | b->buffer = vmalloc(sizeof(struct op_sample) * buffer_size); | 55 | b->buffer = vmalloc_node(sizeof(struct op_sample) * buffer_size, |
56 | cpu_to_node(i)); | ||
56 | if (!b->buffer) | 57 | if (!b->buffer) |
57 | goto fail; | 58 | goto fail; |
58 | 59 | ||