[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MP tables do not report multiple CPUs in Qemu 6.2.0 on x86 when give
From: |
Daniel P . Berrangé |
Subject: |
Re: MP tables do not report multiple CPUs in Qemu 6.2.0 on x86 when given -smp cpus=n flag |
Date: |
Thu, 20 Jan 2022 11:41:55 +0000 |
User-agent: |
Mutt/2.1.3 (2021-09-10) |
On Thu, Jan 20, 2022 at 03:38:26PM +0530, Ani Sinha wrote:
> Actually I am not quite right. This is the real change which changed the
> preference. The previous change was a code re-org that preserved the
> behavior:
>
> commit 4a0af2930a4e4f64ce551152fdb4b9e7be106408
> Author: Yanan Wang <wangyanan55@huawei.com>
> Date: Wed Sep 29 10:58:09 2021 +0800
>
> machine: Prefer cores over sockets in smp parsing since 6.2
>
> In the real SMP hardware topology world, it's much more likely that
> we have high cores-per-socket counts and few sockets totally. While
> the current preference of sockets over cores in smp parsing results
> in a virtual cpu topology with low cores-per-sockets counts and a
> large number of sockets, which is just contrary to the real world.
>
> Given that it is better to make the virtual cpu topology be more
> reflective of the real world and also for the sake of compatibility,
> we start to prefer cores over sockets over threads in smp parsing
> since machine type 6.2 for different arches.
>
> In this patch, a boolean "smp_prefer_sockets" is added, and we only
> enable the old preference on older machines and enable the new one
> since type 6.2 for all arches by using the machine compat mechanism.
>
> Suggested-by: Daniel P. Berrange <berrange@redhat.com>
> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
> Acked-by: David Gibson <david@gibson.dropbear.id.au>
> Acked-by: Cornelia Huck <cohuck@redhat.com>
> Reviewed-by: Andrew Jones <drjones@redhat.com>
> Reviewed-by: Pankaj Gupta <pankaj.gupta@ionos.com>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
> Message-Id: <20210929025816.21076-10-wangyanan55@huawei.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
>
> In any case, the behavior change is intended because of the reasons the
> above commit outlines.
Further compelling reason not mentioned there is that some OS will
artifically restrict how many sockets they are willing to use, while
happily using as many cores as they get. This is usually a licensing
or billing restriction rather than some technical reason, and kinda
silly since cores/sockets are basically interchangable, but that's
life.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|