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

RE: [PATCH v2 02/17] xen/arm: implement helpers to get and update NUMA status


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Wei Chen <Wei.Chen@xxxxxxx>
  • Date: Thu, 12 Jan 2023 06:22:52 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=QG74g9kF2EkooN9cmiYACMFGBjheAxkc/5lBhzwQxZ4=; b=Zw1B0I9lFGiw221OiPCYDt6vL/gs08AEgkH+HhtAKgsB0fD82dvE0N3NGFNn7SpW7OwsEs2zyD94E1vn9GGYkpt8kIRjJfQDBUmobVuwHC0AWKwPLb2l0Gr0o4MxKHEdiNiV74LZX7Nry0yPr9FhewiX+w39/wIaMOR6+H/SppdpFnDj5gBf4htWG2KHWCHPOBXx9Zd36woNI2WvnRx3RDA3ehdZzEJKO2SaOgFycpELESKEWHtf4Kl60wXg18z93CR6MxSr5nq4Qf/qawblQ1igoQGkzYLm5XvsTTy3mjhU3lOtmIf6UphE2y2v/enQ7HpKWmUkvVQAMT8j4f/+BA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B70hFksJmg3r9RA6ZjcZtBCLMy5eSrSo7fxiwvAOOphBLBG/Fps0pXsWHDm+TNXVZOJcSdnJlDd30MbS2+KyMH2PA7Z2S32ItCTueL4XV2o/BMGbDkNXCqXuBAL6W4IhHLQ98QiCWnFy8bGaDamW5SeLoPS9oHQmAmTCm2dwrH4zeSq5cw7bMXexwnRQjzoVoaWgTyktISmJN3ZwsEj72csYyXAGPnbhBpJKkMnN6nOq/P5G332Ca+w4B053UHjpZFi/pVqMvJFdkfET0jC0d64bj3KyQ7VWO6kmsiWG8suvyGyrnHBnnQqWfeXT41zbGQkFE/pIxUW/iW4xsdRU2Q==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: nd <nd@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 12 Jan 2023 06:23:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHZJNEXNkX9GZxGhkCgYl8odWGCka6X2i6AgAJ2fxA=
  • Thread-topic: [PATCH v2 02/17] xen/arm: implement helpers to get and update NUMA status

Hi Jan,

> -----Original Message-----
> From: Jan Beulich <jbeulich@xxxxxxxx>
> Sent: 2023年1月11日 0:38
> To: Wei Chen <Wei.Chen@xxxxxxx>
> Cc: nd <nd@xxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>; Julien
> Grall <julien@xxxxxxx>; Bertrand Marquis <Bertrand.Marquis@xxxxxxx>;
> Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>; Andrew Cooper
> <andrew.cooper3@xxxxxxxxxx>; George Dunlap <george.dunlap@xxxxxxxxxx>; Wei
> Liu <wl@xxxxxxx>; Roger Pau Monné <roger.pau@xxxxxxxxxx>; xen-
> devel@xxxxxxxxxxxxxxxxxxxx
> Subject: Re: [PATCH v2 02/17] xen/arm: implement helpers to get and update
> NUMA status
> 
> On 10.01.2023 09:49, Wei Chen wrote:
> > --- a/xen/arch/arm/include/asm/numa.h
> > +++ b/xen/arch/arm/include/asm/numa.h
> > @@ -22,6 +22,12 @@ typedef u8 nodeid_t;
> >   */
> >  #define NR_NODE_MEMBLKS NR_MEM_BANKS
> >
> > +enum dt_numa_status {
> > +    DT_NUMA_INIT,
> 
> I don't see any use of this. I also think the name isn't good, as INIT
> can be taken for "initializer" as well as "initialized". Suggesting an
> alternative would require knowing what the future plans with this are;
> right now ...
> 

static enum dt_numa_status __read_mostly device_tree_numa;
We use DT_NUMA_INIT to indicate device_tree_numa is in a default value
(System's initial value, hasn't done initialization). Maybe rename it
To DT_NUMA_UNINIT be better?

> > +    DT_NUMA_ON,
> > +    DT_NUMA_OFF,
> > +};
> 
> ... the other two are also used only in a single file, at which point
> their placing in a header is also questionable.
>

This is a good point, I will move them to that file.

> > --- /dev/null
> > +++ b/xen/arch/arm/numa.c
> > @@ -0,0 +1,44 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * Arm Architecture support layer for NUMA.
> > + *
> > + * Copyright (C) 2021 Arm Ltd
> > + *
> > + * This program is free software; you can redistribute it and/or modify
> > + * it under the terms of the GNU General Public License version 2 as
> > + * published by the Free Software Foundation.
> > + *
> > + * This program is distributed in the hope that it will be useful,
> > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> > + * GNU General Public License for more details.
> > + *
> > + * You should have received a copy of the GNU General Public License
> > + * along with this program. If not, see <http://www.gnu.org/licenses/>.
> > + *
> > + */
> > +#include <xen/init.h>
> > +#include <xen/numa.h>
> > +
> > +static enum dt_numa_status __read_mostly device_tree_numa;
> 
> __ro_after_init?
>

OK.
 
> > --- a/xen/arch/x86/include/asm/numa.h
> > +++ b/xen/arch/x86/include/asm/numa.h
> > @@ -12,7 +12,6 @@ extern unsigned int numa_node_to_arch_nid(nodeid_t n);
> >
> >  #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))
> >
> > -extern bool numa_disabled(void);
> >  extern nodeid_t setup_node(unsigned int pxm);
> >  extern void srat_detect_node(int cpu);
> >
> > --- a/xen/include/xen/numa.h
> > +++ b/xen/include/xen/numa.h
> > @@ -55,6 +55,7 @@ extern void numa_init_array(void);
> >  extern void numa_set_node(unsigned int cpu, nodeid_t node);
> >  extern void numa_initmem_init(unsigned long start_pfn, unsigned long
> end_pfn);
> >  extern void numa_fw_bad(void);
> > +extern bool numa_disabled(void);
> >
> >  extern int arch_numa_setup(const char *opt);
> >  extern bool arch_numa_unavailable(void);
> 
> How is this movement of a declaration related to the subject of the patch?
>

Can I add some messages in commit log to say something like "As we have
Implemented numa_disabled for Arm, so we move numa_disabled to common header"?

Cheers,
Wei Chen
 
> Jan

 


Rackspace

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