qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Ani Sinha <ani@anisinha.ca>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	Godmar Back <gback@cs.vt.edu>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, qemu-discuss@nongnu.org,
	Igor Mammedov <imammedo@redhat.com>
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	[thread overview]
Message-ID: <YelKgywMaiHXCR4n@redhat.com> (raw)
In-Reply-To: <alpine.OSX.2.20.2201201536020.38065@athabasca.local>

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 :|



  reply	other threads:[~2022-01-20 15:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAB4+JY+3N5qvC3p_e2DWWa=-QUtW+wH5ZdEJFPKTdSD5TVPXMA@mail.gmail.com>
     [not found] ` <CAFEAcA9tGnEOOhSbCJv2=JoU5C3cFB08mdaLRERgzPdatKQB=g@mail.gmail.com>
2022-01-20  8:57   ` MP tables do not report multiple CPUs in Qemu 6.2.0 on x86 when given -smp cpus=n flag Igor Mammedov
     [not found]   ` <alpine.DEB.2.22.394.2201201305580.844042@anisinha-lenovo>
2022-01-20 10:02     ` Ani Sinha
2022-01-20 10:08       ` Ani Sinha
2022-01-20 11:41         ` Daniel P. Berrangé [this message]
2022-01-20 14:31           ` Godmar Back

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YelKgywMaiHXCR4n@redhat.com \
    --to=berrange@redhat.com \
    --cc=ani@anisinha.ca \
    --cc=gback@cs.vt.edu \
    --cc=imammedo@redhat.com \
    --cc=mst@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-discuss@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).