<br>
<br><font size=2><tt>crash-utility-bounces@redhat.com wrote on 03/09/2006
02:01:40 PM:<br>
<br>
> Haren Myneni wrote: </tt></font>
<br><font size=2><tt>>   </tt></font>
<br><font size=2><tt>> crash-utility-bounces@redhat.com wrote on 03/09/2006
12:24:26 PM: </tt></font>
<br><font size=2><tt>> > Dave Anderson wrote: <br>
> > <br>
> > > Sorry -- I see that NR_CPUS is 128 for ppc64 in crash...
<br>
> > > <br>
> > > But the question remains, do you want to absolutely depend
<br>
> > > upon that always being the case in the kernel? <br>
> > > <br>
> > > Dave <br>
> > <br>
> > Actually, looking again at the paca code, it doesn't seem that
<br>
> > it is dependent upon the kernel NR_CPUS value. </tt></font>
<br><font size=2><tt>> Dave, </tt></font>
<br><font size=2><tt>> Since, we are iterating on nr_paca, though that
it may not be an <br>
> issue even if the kernel changed NR_CPUS to < 128. The only issue
is<br>
> we are reading NR_CPUS/8 for cpu_online_map - not using the remaining
part. </tt></font>
<br><font size=2><tt>> Probably, it will be more clear if you the cpu_online_map
size is <br>
> based on nr_paca. </tt></font>
<br><font size=2><tt>> Like moving the following line  after calculated
nr_paca: </tt></font>
<br><font size=2><tt>> +        readmem(symbol_value("cpu_online_map"),
KVADDR, &cpu_online_map[0], <br>
> +                nr_paca/8,
"cpu_online_map", FAULT_ON_ERROR); <br>
> + </tt></font>
<br><font size=2><tt>> Can I go ahead and change it? - drawback of this
approach is if the <br>
> NR_CPUS in the kernel is greater than 128. <br>
>  </tt></font>
<br><font size=2><tt>> Well, if NR_CPUS goes above 128 in the kernel,
then <br>
> crash will fail in kernel_init() with: <br>
>   <br>
>        if (kt->cpus > NR_CPUS) { <br>
>                error(WARNING,
<br>
>        "calculated number of cpus (%d) greater
than compiled-in <br>
> NR_CPUS (%d)\n", <br>
>                    
   kt->cpus, NR_CPUS); <br>
>                error(FATAL,
"recompile crash with larger NR_CPUS\n"); <br>
>        } </tt></font>
<br><font size=2><tt>> so that's not really a problem. </tt></font>
<br>
<br><font size=2><tt>Dave,</tt></font>
<br>
<br><font size=2><tt>The above error messages will not be printed anyway
since the ppc64_paca_init will be executed later. At this point, kt->cpus
will be 1.</tt></font>
<br>
<br><font size=2><tt>Hence, made minor changes to the previously posted
patch.</tt></font>
<br>
<br><font size=2><tt>Thanks</tt></font>
<br><font size=2><tt>Haren</tt></font>
<br>
<br>
<br>
<br>
<br>
<br><font size=2><tt>>   <br>
> or do you prefer actual allocating the online_map based on nr_paca?
<br>
> I will make changes based on your suggestions. <br>
>  </tt></font>
<br><font size=2><tt>> I don't care either way -- I just want you guys
to be happy.  ;-) </tt></font>
<br><font size=2><tt>> So just tell me how you want it, i.e., either
keep the patch as is, <br>
> or send an updated one. </tt></font>
<br><font size=2><tt>> Dave <br>
>   <br>
>  --<br>
> Crash-utility mailing list<br>
> Crash-utility@redhat.com<br>
> https://www.redhat.com/mailman/listinfo/crash-utility<br>
</tt></font>