[Crash-utility] poisoned per_cpu data not handled on ppc64

Dave Anderson anderson at redhat.com
Thu Mar 9 22:01:40 UTC 2006


Haren Myneni wrote:

>
>
> crash-utility-bounces at redhat.com wrote on 03/09/2006 12:24:26 PM:
>
> > Dave Anderson wrote:
> >
> > > Sorry -- I see that NR_CPUS is 128 for ppc64 in crash...
> > >
> > > But the question remains, do you want to absolutely depend
> > > upon that always being the case in the kernel?
> > >
> > > Dave
> >
> > Actually, looking again at the paca code, it doesn't seem that
> > it is dependent upon the kernel NR_CPUS value.
>
> Dave,
>
> Since, we are iterating on nr_paca, though that it may not be an issue even if the kernel changed NR_CPUS to < 128.
> The only issue is we are reading NR_CPUS/8 for cpu_online_map - not using the remaining part.
>
> Probably, it will be more clear if you the cpu_online_map size is based on nr_paca.
>
> Like moving the following line  after calculated nr_paca:
>
> +        readmem(symbol_value("cpu_online_map"), KVADDR, &cpu_online_map[0],
> +                nr_paca/8, "cpu_online_map", FAULT_ON_ERROR);
> +
>
> Can I go ahead and change it? - drawback of this approach is if the NR_CPUS in the kernel is greater than 128.
>

Well, if NR_CPUS goes above 128 in the kernel, then
crash will fail in kernel_init() with:

       if (kt->cpus > NR_CPUS) {
               error(WARNING,
       "calculated number of cpus (%d) greater than compiled-in NR_CPUS (%d)\n",
                       kt->cpus, NR_CPUS);
               error(FATAL, "recompile crash with larger NR_CPUS\n");
       }

so that's not really a problem.

>
> or do you prefer actual allocating the online_map based on nr_paca? I will make changes based on your suggestions.
>

I don't care either way -- I just want you guys to be happy.  ;-)

So just tell me how you want it, i.e., either keep the patch as is,
or send an updated one.

Dave


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/crash-utility/attachments/20060309/0db071fd/attachment.htm>


More information about the Crash-utility mailing list