[PATCH] oprofile : Use vmalloc_node() in alloc_cpu_buffers()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <[email protected]>

--- 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;
  

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux