diff options
author | Yanan Wang <wangyanan55@huawei.com> | 2021-09-29 10:58:09 +0800 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-10-01 15:28:16 +0200 |
commit | 4a0af2930a4e4f64ce551152fdb4b9e7be106408 (patch) | |
tree | 68e17e724e2e0f4516e96767ed7d93cec8a1daf8 /hw/s390x | |
parent | bbb0c0ec6da8a739b02fbff941b44afc5513d6e4 (diff) | |
download | qemu-4a0af2930a4e4f64ce551152fdb4b9e7be106408.zip qemu-4a0af2930a4e4f64ce551152fdb4b9e7be106408.tar.gz qemu-4a0af2930a4e4f64ce551152fdb4b9e7be106408.tar.bz2 |
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>
Diffstat (limited to 'hw/s390x')
-rw-r--r-- | hw/s390x/s390-virtio-ccw.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 61aeccb..5401c98 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -814,6 +814,7 @@ static void ccw_machine_6_1_class_options(MachineClass *mc) { ccw_machine_6_2_class_options(mc); compat_props_add(mc->compat_props, hw_compat_6_1, hw_compat_6_1_len); + mc->smp_prefer_sockets = true; } DEFINE_CCW_MACHINE(6_1, "6.1", false); |