[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v11 05/14] machine: Improve the error reporting of smp parsin
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v11 05/14] machine: Improve the error reporting of smp parsing |
Date: |
Tue, 28 Sep 2021 12:50:19 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.0 |
On 9/28/21 05:57, Yanan Wang wrote:
> We have two requirements for a valid SMP configuration:
> the product of "sockets * cores * threads" must represent all the
> possible cpus, i.e., max_cpus, and then must include the initially
> present cpus, i.e., smp_cpus.
>
> So we only need to ensure 1) "sockets * cores * threads == maxcpus"
> at first and then ensure 2) "maxcpus >= cpus". With a reasonable
> order of the sanity check, we can simplify the error reporting code.
> When reporting an error message we also report the exact value of
> each topology member to make users easily see what's going on.
>
> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
> Reviewed-by: Andrew Jones <drjones@redhat.com>
> Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com>
> ---
> hw/core/machine.c | 22 +++++++++-------------
> hw/i386/pc.c | 24 ++++++++++--------------
> 2 files changed, 19 insertions(+), 27 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
- [PATCH v11 00/14] machine: smp parsing fixes and improvement, Yanan Wang, 2021/09/27
- [PATCH v11 01/14] machine: Deprecate "parameter=0" SMP configurations, Yanan Wang, 2021/09/27
- [PATCH v11 02/14] machine: Minor refactor/fix for the smp parsers, Yanan Wang, 2021/09/27
- [PATCH v11 05/14] machine: Improve the error reporting of smp parsing, Yanan Wang, 2021/09/27
- [PATCH v11 07/14] qtest/numa-test: Use detailed -smp CLIs in test_def_cpu_split, Yanan Wang, 2021/09/27
- [PATCH v11 08/14] machine: Prefer cores over sockets in smp parsing since 6.2, Yanan Wang, 2021/09/27
- [PATCH v11 06/14] qtest/numa-test: Use detailed -smp CLIs in pc_dynamic_cpu_cfg, Yanan Wang, 2021/09/27
- [PATCH v11 03/14] machine: Uniformly use maxcpus to calculate the omitted parameters, Yanan Wang, 2021/09/27