[PATCH v3 3/5] powerpc/numa: Use cpu node map of first sibling thread

Srikar Dronamraju srikar at linux.vnet.ibm.com
Fri Sep 13 15:44:51 AEST 2019


* Nathan Lynch <nathanl at linux.ibm.com> [2019-09-12 13:15:03]:

> Srikar Dronamraju <srikar at linux.vnet.ibm.com> writes:
> 
> >> 
> >> I think just WARN_ON(cpu_online(fcpu)) would be satisfactory. In my
> >> experience, the downstream effects of violating this condition are
> >> varied and quite difficult to debug. Seems only appropriate to emit a
> >> warning and stack trace before the OS inevitably becomes unstable.
> >
> > I still have to try but wouldn't this be a problem for the boot-cpu?
> > I mean boot-cpu would be marked online while it tries to do numa_setup_cpu.
> > No?
> 
> This is what I mean:
> 
>  +      if (fcpu != lcpu) {
>  +              WARN_ON(cpu_online(fcpu));
>  +              map_cpu_to_node(fcpu, nid);
>  +      }
> 

Yes this should work. Will send an updated patch with this change.

> I.e. if we're modifying the mapping for a remote cpu, warn if it's
> online.
> 
> I don't think this would warn on the boot cpu -- I would expect fcpu and
> lcpu to be the same and this branch would not be taken.

-- 
Thanks and Regards
Srikar Dronamraju



More information about the Linuxppc-dev mailing list