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

2019-09-12 Thread Srikar Dronamraju
* Nathan Lynch [2019-09-12 13:15:03]: > Srikar Dronamraju 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

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

2019-09-12 Thread Nathan Lynch
Srikar Dronamraju 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

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

2019-09-12 Thread Srikar Dronamraju
> > 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

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

2019-09-12 Thread Nathan Lynch
Hi Srikar, Srikar Dronamraju writes: >> > @@ -496,6 +501,16 @@ static int numa_setup_cpu(unsigned long lcpu) >> >if (nid < 0 || !node_possible(nid)) >> >nid = first_online_node; >> > >> > + /* >> > + * Update for the first thread of the core. All threads of a core >> > + *

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

2019-09-11 Thread Srikar Dronamraju
Hi Nathan, Thanks for your reviews. > > - if ((nid = numa_cpu_lookup_table[lcpu]) >= 0) { > > + nid = numa_cpu_lookup_table[fcpu]; > > + if (nid >= 0) { > > map_cpu_to_node(lcpu, nid); > > return nid; > > } > > Yes, we need to something like this to prevent a

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

2019-09-11 Thread Nathan Lynch
Hi Srikar, Srikar Dronamraju writes: > @@ -467,15 +467,20 @@ static int of_drconf_to_nid_single(struct drmem_lmb > *lmb) > */ > static int numa_setup_cpu(unsigned long lcpu) > { > - int nid = NUMA_NO_NODE; > struct device_node *cpu; > + int fcpu =