[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] vl.c: make sure maxcpus matches topology to pre
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] vl.c: make sure maxcpus matches topology to prevent migration failure |
Date: |
Thu, 23 Aug 2018 18:32:41 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
On 23/08/2018 16:51, Igor Mammedov wrote:
> Topology (threads*cores*sockets) must match maxcpus to be valid,
> otherwise we could start QEMU with invalid topology that throws
> a error on migration destination side, that should not be reachable:
> Source:
> -smp 8,maxcpus=64,cores=1,threads=8,sockets=1
> // hotplug cpus upto maxcpus
> Destination:
> -smp 64,maxcpus=64,cores=1,threads=8,sockets=1
> qemu: cpu topology: sockets (1) * cores (1) * threads (8) < smp_cpus (64)
The destination should have sockets=8, shouldn't it?
It seems to me that, at startup, you should have cpus = s*t*c and cpus
<= maxcpus. Currently we check cpus <= s*t*c <= maxcpus, which doesn't
make much sense.
Paolo
> Signed-off-by: Igor Mammedov <address@hidden>
> ---
> vl.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 16b913f..2b35e0c 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1238,10 +1238,10 @@ static void smp_parse(QemuOpts *opts)
> exit(1);
> }
>
> - if (sockets * cores * threads > max_cpus) {
> + if (sockets * cores * threads != max_cpus) {
> error_report("cpu topology: "
> - "sockets (%u) * cores (%u) * threads (%u) > "
> - "maxcpus (%u)",
> + "sockets (%u) * cores (%u) * threads (%u) not equal
> to"
> + " maxcpus (%u)",
> sockets, cores, threads, max_cpus);
> exit(1);
> }
>
- [Qemu-devel] [PATCH] vl.c: make sure maxcpus matches topology to prevent migration failure, Igor Mammedov, 2018/08/23
- Re: [Qemu-devel] [PATCH] vl.c: make sure maxcpus matches topology to prevent migration failure,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH] vl.c: make sure maxcpus matches topology to prevent migration failure, Eduardo Habkost, 2018/08/23
- Re: [Qemu-devel] [PATCH] vl.c: make sure maxcpus matches topology to prevent migration failure, Igor Mammedov, 2018/08/24
- Re: [Qemu-devel] [PATCH] vl.c: make sure maxcpus matches topology to prevent migration failure, Eduardo Habkost, 2018/08/24
- Re: [Qemu-devel] [PATCH] vl.c: make sure maxcpus matches topology to prevent migration failure, Igor Mammedov, 2018/08/24
- Re: [Qemu-devel] [PATCH] vl.c: make sure maxcpus matches topology to prevent migration failure, Eduardo Habkost, 2018/08/24
- Re: [Qemu-devel] [libvirt] [PATCH] vl.c: make sure maxcpus matches topology to prevent migration failure, Daniel P . Berrangé, 2018/08/24
- Re: [Qemu-devel] [PATCH] vl.c: make sure maxcpus matches topology to prevent migration failure, Igor Mammedov, 2018/08/24