[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [XEN RFC PATCH 35/40] xen: enable numa_scan_nodes for device tree based NUMA
- To: Julien Grall <julien@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "sstabellini@xxxxxxxxxx" <sstabellini@xxxxxxxxxx>
- From: Wei Chen <Wei.Chen@xxxxxxx>
- Date: Sat, 28 Aug 2021 02:13:24 +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=ucQt8Pi/J6q0nV6uJ+uu6gy7vjI/4ZeeyN4d7dZgACM=; b=gduyXorWxV+8tOiIteW9/UQdhZ+1/I6hBauopgsa6tPZ8aQdbJDDjcp8bff2kxzcxXFQRcyvptSxbJ48GBhxv0o2KtwQdfEkH8f1ad3IwJgJnWux+vISQAJV89Z79+/vNM3OdP2LoVn7Y4LQNc0kPqK2ZGyXydQSXfK+URD2KkBEnfo/HBnBf5vgmi/BUFFlNLfs/spy9r3zUyRR/ixe0/gCNw+Ss5HmMKglfGDGX9o63/l25a/ZyqlB8XyHsWL1MDaeDEpgcooMPEHZYz7SpFhmWFRhO7dPGmFUwST36eEIcHjWNSxd7uYoBdNOIauWBfHCPXHz+/k1rc5ou2ON/Q==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GCOjEHtqAe15JBwX9d5LMWlbxZICad7AJYLa1VdTa+5TmHA34ATbh5Zk/RBmvL+LX9KAJb57f2YZzD7N6Y8rNsgFXE3nC0/Ayt/y6OCj5w1AYHG1T40dmVd5lAj9hLALwOI81dhopuClvUNiWNZ8ZU/V/IGf1RxO7LWzTdYTUVLdpZAeUosCcTu2d6xCqbK/B5hQzuaFP5azmsP/AlWhUTQjcAbv86RAV/vaJB70rx+9qkAr5Ab2Pd9hNGSrfIin5gwjE+FFj7lhDTKPnlVWwUFbS21bOVfS/qGaAQefl4wDrujP7g2BiJB1ICJRvY1O41sPefegRPENZ6iZEKoC3w==
- Authentication-results-original: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
- Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
- Delivery-date: Sat, 28 Aug 2021 02:13:44 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Nodisclaimer: true
- Original-authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=arm.com;
- Thread-index: AQHXjptQirPWwTlIkEuKswf+MUcBvauHf9sAgADHQOA=
- Thread-topic: [XEN RFC PATCH 35/40] xen: enable numa_scan_nodes for device tree based NUMA
Hi Julien,
> -----Original Message-----
> From: Julien Grall <julien@xxxxxxx>
> Sent: 2021年8月27日 22:19
> To: Wei Chen <Wei.Chen@xxxxxxx>; xen-devel@xxxxxxxxxxxxxxxxxxxx;
> sstabellini@xxxxxxxxxx; jbeulich@xxxxxxxx
> Cc: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
> Subject: Re: [XEN RFC PATCH 35/40] xen: enable numa_scan_nodes for device
> tree based NUMA
>
> Hi Wei,
>
> On 11/08/2021 11:24, Wei Chen wrote:
> > Now, we can use the same function for ACPI and device tree based
> > NUMA to scan memory nodes.
> >
> > Signed-off-by: Wei Chen <wei.chen@xxxxxxx>
> > ---
> > xen/common/numa.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/xen/common/numa.c b/xen/common/numa.c
> > index 8ca13e27d1..d15c2fc311 100644
> > --- a/xen/common/numa.c
> > +++ b/xen/common/numa.c
> > @@ -381,7 +381,7 @@ void __init numa_initmem_init(unsigned long
> start_pfn, unsigned long end_pfn)
> > return;
> > #endif
> >
> > -#ifdef CONFIG_ACPI_NUMA
> > +#if defined(CONFIG_ACPI_NUMA) || defined(CONFIG_DEVICE_TREE_NUMA)
>
> numa.c is only built when CONFIG_NUMA is set. I don't think CONFIG_NUMA
> will ever set if neither CONFIG_ACPI_NUMA or CONFIG_DEVICE_TREE_NUMA is
> set. So do we actually need this #ifdef?
>
Yes, you're right. This check should be removed.
> > if ( !numa_off && !numa_scan_nodes((u64)start_pfn << PAGE_SHIFT,
> > (u64)end_pfn << PAGE_SHIFT) )
> > return;
> >
>
> Cheers,
>
> --
> Julien Grall
|