On 26.08.2021 10:49, Julien Grall wrote: > On 26/08/2021 08:24, Wei Chen wrote: >>> -----Original Message----- >>> From: Julien Grall <jul...@xen.org> >>> Sent: 2021年8月26日 0:58 >>> On 11/08/2021 11:24, Wei Chen wrote: >>>> --- a/xen/arch/arm/smpboot.c >>>> +++ b/xen/arch/arm/smpboot.c >>>> @@ -358,6 +358,12 @@ void start_secondary(void) >>>> */ >>>> smp_wmb(); >>>> >>>> + /* >>>> + * If Xen is running on a NUMA off system, there will >>>> + * be a node#0 at least. >>>> + */ >>>> + numa_add_cpu(cpuid); >>>> + >>> >>> On x86, numa_add_cpu() will be called before the pCPU is brought up. I >>> am not quite too sure why we are doing it differently here. Can you >>> clarify it? >> >> Of course we can invoke numa_add_cpu before cpu_up as x86. But in my tests, >> I found when cpu bring up failed, this cpu still be add to NUMA. Although >> this does not affect the execution of the code (because CPU is offline), >> But I don't think adding a offline CPU to NUMA makes sense. > > Right, but again, why do you want to solve the problem on Arm and not > x86? After all, NUMA is not architecture specific (in fact you move most > of the code in common). > > In fact, the risk, is someone may read arch/x86 and doesn't realize the > CPU is not in the node until late on Arm. > > So I think we should call numa_add_cpu() around the same place on all > the architectures.
FWIW: +1 Jan