Messages in this thread | | | Date | Thu, 09 Oct 2008 15:26:37 +0800 | From | Lai Jiangshan <> | Subject | Re: [PATCH] rudimentary tracing for Classic RCU |
| |
KOSAKI Motohiro wrote: > Hi Lai-san, > >>>> 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. >> I thought the default value of NR_CPUS is 32. > > it's pointless. > Almost distribution use _very_ large NR_CPUS (likes 4096). > So, We should concern large NR_CPUS.
Thanks.
So my advice is to use seq_file.
> > >> if NR_CPUS is too large, I think using seq_file is good idea, >> and rcuclassic_trace_mutex is not need too. > > > > >
| |