[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [XEN RFC PATCH 26/40] xen/arm: Add boot and secondary CPU to NUMA system


  • To: Jan Beulich <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Thu, 26 Aug 2021 12:08:09 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/oLweSJtCwqTAEnsOEJgf653dcWn2syINwRuJqI0+Nc=; b=Py3u3J13X+jiw/+DeCszudAsn7T4pP0a0k4UGdmQ6qOz12lkeQnAIjO0GERwsRrhio8gzb10qjfo9i1b2oPq98HNzfq1wQTxFaeGXLYx74GNoBBHgjGHBAAdSEhuP3laPeBmXAE1UYKnruwm4KeRm3THnFLiyPPzDKtI2bShaq8W07Z3MYNWZlk6XK3PKpra3NreuHqFHDiFWh4qj02aQMDXoy8AJfKr8Pd2gWC9Js5peGNBDSb77dmVEu6Tsw6hEdBH9URvWPzrrPEFvSQBB5qvWz5XjHJdlQHcVpZjuiql0yLAE+L57hshZ2az2Ii/WL3MVGq/lUdID6oI3eW32g==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UTqDJkdGYHpmikcTIS+2oe4EORXtl4tIcdStxI/l2HbEZnB3Cb5Fwj/L9CfUTn/NeC+rVCFZ7Yw74LxaAUaMlEATHkkpB9K8daP1E5XU+44y6jGDFynNBuoGY1aZ+FFptcK7H/65e4YKON2OliQxq59IXJG0959t3+6gO8dIkVyO1rRRSOyT5UsT4lB8Zv03z9fPJMyNbZmyVmjYdD3YqHh1iu2kGhWRsRHekWZ/xvTOD0XyUKrOLTMzCFomIYgIRQxiERw34Bg+a+2FRZhOJ0d2hafXunSCuTXO7BEankaq+dohms0j3f/jwXLcNgWGRE9mUr0ft7RWFvloY9xKsw==
  • Authentication-results-original: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>
  • Delivery-date: Thu, 26 Aug 2021 12:08:26 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: suse.com; dkim=none (message not signed) header.d=none;suse.com; dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHXjptLf/jfnZiVikStQBDm6XRL0auEh6AAgADr9fCAAB2+AIAADhiAgAAloMA=
  • Thread-topic: [XEN RFC PATCH 26/40] xen/arm: Add boot and secondary CPU to NUMA system

Hi Jan, Julien,

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: 2021年8月26日 17:40
> To: Julien Grall <julien@xxxxxxx>; Wei Chen <Wei.Chen@xxxxxxx>
> Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx; sstabellini@xxxxxxxxxx
> Subject: Re: [XEN RFC PATCH 26/40] xen/arm: Add boot and secondary CPU to
> NUMA system
> 
> On 26.08.2021 10:49, Julien Grall wrote:
> > On 26/08/2021 08:24, Wei Chen wrote:
> >>> -----Original Message-----
> >>> From: Julien Grall <julien@xxxxxxx>
> >>> 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).
> >

I am not very familiar with x86, so when I was composing this patch series,
I always thought that if I could solve it inside Arm Arch, I would solve it
inside Arm Arch. That seems a bit conservative, and inappropriate on solving
this problem.

> > 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

I agree. As Jan in this discussion. How about following current x86's
numa_add_cpu behaviors in __start_xen, but add some code to revert
numa_add_cpu when cpu_up failed (both Arm and x86)?

> 
> Jan


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.