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 <wangyana...@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 <berra...@redhat.com>
>     Signed-off-by: Yanan Wang <wangyana...@huawei.com>
>     Acked-by: David Gibson <da...@gibson.dropbear.id.au>
>     Acked-by: Cornelia Huck <coh...@redhat.com>
>     Reviewed-by: Andrew Jones <drjo...@redhat.com>
>     Reviewed-by: Pankaj Gupta <pankaj.gu...@ionos.com>
>     Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>
>     Message-Id: <20210929025816.21076-10-wangyana...@huawei.com>
>     Signed-off-by: Paolo Bonzini <pbonz...@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 :|


Reply via email to