lkml.org 
[lkml]   [2005]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
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;
\
 
 \ /
  Last update: 2005-11-25 14:39    [W:0.049 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site