[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20081009115041.GC6628@linux.vnet.ibm.com>
Date: Thu, 9 Oct 2008 04:50:41 -0700
From: "Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>
To: Andi Kleen <andi@...stfloor.org>
Cc: Lai Jiangshan <laijs@...fujitsu.com>, linux-kernel@...r.kernel.org,
mingo@...e.hu, rjw@...k.pl, dipankar@...ibm.com,
tglx@...uxtronix.de
Subject: Re: [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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists