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

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


  • To: Wei Chen <Wei.Chen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 14 Jul 2022 13:10:09 +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=i62fDuX3E5nXSFqeJ28T1/CIrf0ZC7wQqaqTxJVT+Hs=; b=CLSHL/5r45/ZsO/WJQHIds4i8uigDc6LLd16DIbi7ZGNIumFC+LX3eQ6jkHQE20Ytp850R75wIW0AK/Hvb1Kd8RCi4C3MyFgIDJeVwiZ7Q7oDw/Wp9Cw9V24TN4jZK6YGDnlGwP9maNHYD/nGcT9LuNVjo27vDTuarNsj92akqh1WIryQzZ9olCmPMDCvxajZtUX11rJ+jE/sW7iHkhbAhkMwyrwOsigZ4U3zDYmKslsAsSXNUBQ6KLSc1UltRDD8Lwse6WNFwoJ8UJfHxcDhkopItVUAdDHV4dI9paV6X9k+KFPXlFYKxGMuCOnt2DltkKzPGpTjHpaPay2fibmhQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FQL/RQeGCQdd5sI2ZA6uK4+7sX2aaRu/Xl7u2ASOHBJm1VRrH5NSVnq6JnM/W6SloT4RF2NfjNmuIhFlFt4VpotZhWweNZlpyaMiZiNJzfBfBJmnhfqzW8N1Ghmz/nTBNpSJNaeOQEob5pWhb45qKl+kwizQQrlrqN/3Waa9mNTG9YGGvJUtlB+G8Z2Ce1qPxy0EUiSsSBqFE+1Yq2Fd6J0L+tXa+Uqhfapaago6w2J6AE8lefL1gk/mlHyMpnIBkYIFV+Iif9uDABO1kow/den6qnSgp5CWZ1DWsfIInCs0lpWBo//viSawDFRshIDASxYy27X21lkiZS9IOozmtg==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: nd <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" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 14 Jul 2022 11:10:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.07.2022 12:14, Wei Chen wrote:
> Hi Jan,
> 
>> -----Original Message-----
>> From: Jan Beulich <jbeulich@xxxxxxxx>
>> Sent: 2022年7月12日 22:34
>> To: Wei Chen <Wei.Chen@xxxxxxx>
>> Cc: nd <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
>> Subject: Re: [PATCH v2 9/9] xen: introduce a Kconfig option to configure
>> NUMA nodes number
>>
>> On 08.07.2022 16:54, Wei Chen wrote:
>>> --- a/xen/arch/Kconfig
>>> +++ b/xen/arch/Kconfig
>>> @@ -17,3 +17,14 @@ config NR_CPUS
>>>       For CPU cores which support Simultaneous Multi-Threading or
>> similar
>>>       technologies, this the number of logical threads which Xen will
>>>       support.
>>> +
>>> +config NR_NUMA_NODES
>>> +   int "Maximum number of NUMA nodes supported"
>>> +   range 1 255
>>> +   default "64"
>>> +   depends on NUMA
>>
>> Does 1 make sense? That's not going to be NUMA then, I would say.
>>
> 
> Ok, we need at least 2 nodes to be a real NUMA.
> 
>> Does the value being (perhaps far) larger than NR_CPUS make sense?
>>
> 
> Arm has 128 default NR_CPUS (except some platforms) and x86 has 256.
> So I am not very clear about your comments about far larger? As my
> Understanding, one node has 2 or 4 cores are very common in a NUMA
> System.

The defaults are fine. But does it make sense to have 255 nodes when
just 32 CPUs were selected? I'm afraid kconfig is going to get in the
way, but I think I'd like the upper bound to be min(NR_CPUS, 255).

>> Why does the range end at a not-power-of-2 value? (I was actually
>> going to suggest to have a shift value specified here, until
>> spotting that NODES_SHIFT isn't used anywhere else, and hence
>> you're rightfully deleting it.)
>>
> 
> I think we have discussed about the 255 in v1. Because Xen is using
> u8 as nodeid_t, so 255 may be a upper bound.

Indeed, but that's something you could have mentioned in the commit
message as justification. But you could also have opted to make the
upper bound 128. Let me ask you: Are you aware of systems with more
than a dozen or so nodes, that Xen can in principle run on?

> And if use a shift value, from a user perspective, I don't like it.
> It needs to be converted, not intuitive enough. It also limits my
> input range, even though my numerical values are reasonable. Yes,
> if a machine has 15 node, we can ask them to input 16, but why not
> let the users decide? instead of being forced to enter 16 by the program?

At least x86 Linux also wants this specified as a shift value, so
people may actually be (more) used to that. Plus non-pwer-of-2
values may yield more complex calculations when the compiler
generates code. Think of a two-dimensional distance table, for
example.

Jan



 


Rackspace

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