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

Re: [PATCH v2 2/9] xen/x86: Use enumerations to indicate NUMA status


  • To: Wei Chen <Wei.Chen@xxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Thu, 14 Jul 2022 12:51:42 +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=tfx2gLiDdbTQCZftkUnqkWcZ0L9UfsBF/czeE5UqdVw=; b=PyYcebXmpYaEyW+zhBiw8HcqIjHMQVwdAMUaReMS+QeeSNRPG8ld9qsXknTJy9wkzhQuF/STNV/2lM9/+WgPbXpFxg2GH0EcK0SC4mVvg/i7WQHV1T+6ExSYNJBS2SsnMhiXiBJ0e/+AgkQDN8J3h40ZspWvvzsXlYcUiBJLidsPvh7yc/qlXGr1rFiXCwUyBD+dUcN4+o1myTQYOqRgpp/BcUhrOvGbotF/52a/vW3GfnnnuSjfU6w6/SvedklLZm62o42MvOcwahsTHnGTHcHPSQhqJn6gigcmT9+ahAoDVTikHeOtXwA+uTSroha044OQP3kEC4ZuG6JQ9/ssnA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ofAfOwJ4c+lZiEzxqE6twSO4sBiFI6K89z4JS3sAdWxB/e5yv3Yolz1fnvR3fCcbpbl6vxy4RgfQ/ZfkWLzmxFwRLtQnWdctMT6QIKcHUNlnrwwWtgLlytBj7Nl8Bu4PKaqkUq7QfiXgrFAco7kibfGF0PJA9yAyipcqwQLGTxI6ektMkM9tiklgjOwdt4obnaf72gSC76lKZh4Vcyz60FZLhGUPv4yKsh/h1OVEEhZT+Bc9H4ZicBRMq8Igem+m2TnOfhoOMv7MzLb1i648nyKkzrcvz8Tzpa+P8GiPSU+ZNF5f6Tr5O0j34wRPDD990cZwAZn5GQRcZ+fkpMq3DA==
  • 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>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 14 Jul 2022 10:51:55 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 14.07.2022 12:37, Jan Beulich wrote:
> On 14.07.2022 12:26, Wei Chen wrote:
>>> From: Jan Beulich <jbeulich@xxxxxxxx>
>>> Sent: 2022年7月14日 17:58
>>> To: Wei Chen <Wei.Chen@xxxxxxx>
>>>>
>>>> How about update the table like this:
>>>> +------------+----------+----------------+----------------+------------+
>>>> |  original  |          |                |                |            |
>>>> +------------+----------+----------------+----------------+------------+
>>>> | numa_off   | true     | true           | true           | true       |
>>>> | acpi_numa  | 0        | 1              | -1             | x          |
>>>> | numa_fake  | x        | x              | x              | fake_nodes |
>>>> | enum state | numa_off | numa_off       | numa_off       | numa_off   |
>>>> +------------+----------+----------------+----------------+------------+
>>>>
>>>> +------------+----------------+------------+-------------+------------+
>>>> |  original  |                |            |             |            |
>>>> +------------+----------------+------------+-------------+------------+
>>>> | numa_off   | false          | false      | false       | false      |
>>>> | acpi_numa  | 0              | 1          | -1          | x          |
>>>> | numa_fake  | x              | x          | x           | fake_nodes |
>>>> | enum state | numa_fw_nodata | numa_fw_ok | numa_fw_bad | numa_emu   |
>>>> +------------+----------------+------------+-------------+------------+
>>>
>>> Well, this makes the table complete, but it doesn't explain how you mean
>>> to fold the settings of the two command line options into one variable.
>>>
>>
>> No matter how many separate "numa=" parameters have been parsed from
>> Command line, the values of these original variables are determined
>> after parsing the command line. So the determined status can be mapped
>> to the new one variable from above table.
> 
> Hmm, I was partly wrong - the initial values of both variables are
> indeed set from just the single "numa=" parsing. But later on they
> "evolve" independently, and multiple "numa=" on the command line
> can also have "interesting" effects. I'm afraid I still can't
> convince myself that the new mapping fully represents all originally
> possible combinations (nor can I convince myself that in the existing
> code everything is working as intended).

Maybe the solution is to make numa_off common but keep acpi_numa
arch-specific? Then e.g. the replacement of srat_disabled() could
be

int numa_disabled(void)
{
    return numa_off || arch_numa_disabled();
}

with arch_numa_disabled() evaluating acpi_numa on x86.

Jan



 


Rackspace

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