On Wed, Jul 28 2021, Yanan Wang <wangyana...@huawei.com> wrote: > 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. > > Acked-by: David Gibson <da...@gibson.dropbear.id.au> > Suggested-by: Daniel P. Berrange <berra...@redhat.com> > Signed-off-by: Yanan Wang <wangyana...@huawei.com> > --- > hw/arm/virt.c | 1 + > hw/core/machine.c | 36 ++++++++++++++++++++++++++---------- > hw/i386/pc.c | 36 ++++++++++++++++++++++++++---------- > hw/i386/pc_piix.c | 1 + > hw/i386/pc_q35.c | 1 + > hw/ppc/spapr.c | 1 + > hw/s390x/s390-virtio-ccw.c | 1 + > include/hw/boards.h | 1 + > qemu-options.hx | 3 ++- > 9 files changed, 60 insertions(+), 21 deletions(-)
Acked-by: Cornelia Huck <coh...@redhat.com>