lkml.org 
[lkml]   [2008]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] rudimentary tracing for Classic RCU
On Thu, Oct 09, 2008 at 08:55:29AM +0200, Andi Kleen wrote:
> > In this case, why not define it as:
> > static char buf[20*NR_CPUS + 100];
>
> Actually you should near never use NR_CPUS now but always num_possible_cpus()
> (or even num_online_cpus()) Using NR_CPUS can lead to extreme waste
> of memory on kernels which are compiled for 4096 CPUs for example.
>
> And with num_possible_cpus() kmalloc is needed.

OK, new one on me! Thank you for the pointer!

Thanx, Paul


\
 
 \ /
  Last update: 2008-10-09 13:53    [W:0.401 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site