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

Re: [PATCH v3 6/6] xen: introduce a Kconfig option to configure NUMA nodes number


  • To: Wei Chen <wei.chen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 25 Aug 2022 15:05:54 +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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=z4reuZxpKOygi2C/hkQSeef4QCTSg1PQqAAC+tDXQJo=; b=Mr2VlZKoBRu/9M3nGcyXL7ja+3cGJ4F+wfdPhRKsMPTlVzuvcUWOB93ZXJocBbkFViCVl20kg8sjqnnwUa8km+DjqJzO+5c72yuO9FVVc6niX02pxj70nA3YgACDCRAu/s/+dG+wwrsOcytaWbUf1duoJWczguiJ6/a+hqfx7gw4jCcpcUckAebaaIa+PUPrWee9yvSTLtaVaFReFdCOYlpGfCy0Syr7nTSerAYA8xGMWyN3ajNZHAuVhk/YLEIZ+cGmsaQNchokX0YBUcKnoPf3e5fBtjYJE2SX9qpW4OxoKsYc+aBSw3NZ32NiNgT0yww23J5dmCBxpY6VbI5Nag==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=C4p/nXoxSUPg5jxmSxRIoAnguYv6gUmErl3BbaYTqCduHtSjQD56kbxru5uXKHwmtBc3fpSJDYuT8556V6G6TlJjaq2AKx0uy6xX23KE8IpWrGVrWRyL5Me0q7GNBtZOYPoaEVc1fA5rncKnSwjDp8MW92owyj3wx4SDtoAm00wVNASPrlFRbh8dnN+ONdm3IdanGT157V+gBiogPQ2YLvthrAmb59I99MCBwO/+sGZkxqOxuT2Sstvz4LwtdpO20Ja/akq1uDjLp6vbkitjN/WBXDyXIx97BA+HNKm6qURKOTTpobG3QKarIgF1s+DrVHl57wwoKaU68O4sgGQnvg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: nd@xxxxxxx, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx
  • Delivery-date: Thu, 25 Aug 2022 13:06:09 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 22.08.2022 04:58, Wei Chen wrote:
> Current NUMA nodes number is a hardcode configuration. This
> configuration is difficult for an administrator to change
> unless changing the code.
> 
> So in this patch, we introduce this new Kconfig option for
> administrators to change NUMA nodes number conveniently.
> Also considering that not all architectures support NUMA,
> this Kconfig option only can be visible on NUMA enabled
> architectures. Non-NUMA supported architectures can still
> use 1 as MAX_NUMNODES.

Especially the uses of "NUMA nodes number" make this read somewhat
odd. If I was to re-write all of this, it would become something
like:

Currently the maximum number of NUMA nodes is a hardcoded value.
This provides little flexibility unless changing the code.

Introduce a new Kconfig option to change the maximum number of
NUMA nodes conveniently. Also considering that not all
architectures support NUMA, this Kconfig option is only visible
on NUMA enabled architectures. Architectures not supporting NUMA
still use 1 for MAX_NUMNODES.

> As NODES_SHIFT is currently unused, we're taking this
> opportunity to remove it.
> 
> Signed-off-by: Wei Chen <wei.chen@xxxxxxx>

Acked-by: Jan Beulich <jbeulich@xxxxxxxx>

Note that there's an alternative with less #ifdef-ary:

config NR_NUMA_NODES
        int "Maximum number of NUMA nodes supported" if NUMA
        range 2 64 if NUMA
        default "1" if !NUMA
        default "64"

But I can see reasons why one might deem it better for there to
not be any CONFIG_NR_NUMA_NODES in the resulting .config when
!NUMA.

Jan



 


Rackspace

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