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

Re: [XEN RFC PATCH 03/40] xen/x86: Initialize memnodemapsize while faking NUMA node


  • To: Wei Chen <wei.chen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 12 Aug 2021 17:32:57 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.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=R+eK3KoTdo7kEAFGExDlCPWWKIpE75nvxUk259FvVhE=; b=BAI2DWGA5la88lMrmO+x9nvat7LOQTCulOXUi8m/r+LvvMkHV/CTqv1MQ+EXsr6gdnduMLG52MtyKHtIXCG75f0AB5w4ihyNrX/D4AM/2btkyUWAumJd/46OKghdJnVrftp9lzTm5KT6NN2ZpVcqxfEiUofuT4KAWLoQKh9MwlkdMSDkutZk61Y528BpuSHBWXTb25rjtqWKFKxoCNONSOk78X9n/MVkURvE2jk9ac1Z4ZEAp+nLy914403eS5XR5PCKdJKyBnti0xMRS+eUkYi6hZqU9BEJoerUBrH3ACA/5pzQW+J/tBy/c+1LvOsHKhW3dA2jYZEomr8BeQ/NnQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DcslH116eTT+hcLYgPHpxP0LB2ywGij8KgO1fklKdNN/+EIi6eR8w6h9DCUV7vDFyr1rZ1lAwPe5vbhXfADR1NLAKkVUcO+IC1rj/aerDbYYDYD7fcq0WQbRS11R2+NilOfGcJdUFwA/uq1L/ucGAzaEVyC9xqeHvNOY/4cXsFSsqM7sCHRpKCqAn/WPHYf2yZFf/GlUu5H4XmxU43v1gvlJU4uWD/5d/30uJHb235uwj5zS9eVykhtZpXqOHin2Ue1o7pA1+pOc1Jvd4mn242RCZI2NjYOiuueUlK1uAhP6nuTDcM+kdThVg4MSubKC9KN9yVGVC9cSif04C08z4A==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=suse.com;
  • Cc: Bertrand.Marquis@xxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, sstabellini@xxxxxxxxxx, julien@xxxxxxx
  • Delivery-date: Thu, 12 Aug 2021 15:33:20 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 11.08.2021 12:23, Wei Chen wrote:
> When system turns NUMA off or system lacks of NUMA support,
> Xen will fake a NUMA node to make system works as a single
> node NUMA system.
> 
> In this case the memory node map doesn't need to be allocated
> from boot pages. But we should set the memnodemapsize to the
> array size of _memnodemap. Xen hadn't done it, and Xen should
> assert in phys_to_nid. But because x86 was using an empty
> macro "VIRTUAL_BUG_ON" to replace ASSERT, this bug will not
> be triggered.

How about we promote VIRTUAL_BUG_ON() to expand to at least ASSERT()?

> --- a/xen/arch/x86/numa.c
> +++ b/xen/arch/x86/numa.c
> @@ -270,6 +270,8 @@ void __init numa_initmem_init(unsigned long start_pfn, 
> unsigned long end_pfn)
>      /* setup dummy node covering all memory */
>      memnode_shift = BITS_PER_LONG - 1;
>      memnodemap = _memnodemap;
> +    memnodemapsize = ARRAY_SIZE(_memnodemap);

But this doesn't reflect reality then, does it? We'd rather want to
set the size to 1, I would think.

Jan




 


Rackspace

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