diff mbox series

[v2] pc: q35: Bump max_cpus to 1024

Message ID 166876173513.24238.8968021290016401421.stgit@tumbleweed.Wayrath (mailing list archive)
State New, archived
Headers show
Series [v2] pc: q35: Bump max_cpus to 1024 | expand

Commit Message

Dario Faggioli Nov. 18, 2022, 8:55 a.m. UTC
Keep the old limit of 288 for machine versions 7.2 and earlier.

Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
---
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Eduardo Habkost <eduardo@habkost.net>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
---
Changes from v1:
- fix actually keeping the old max value for the 7.2 machine type,
  which was the original goal, but was done wrongly

---
This is related to:

https://lore.kernel.org/qemu-devel/c705d0d8d6ed1a520b1ff92cb2f83fef19522d30.camel@suse.com/

With this applied to QEMU, I've been able to start a VM with as high as
980 vCPUs (even if I was on an host with 384 pCPUs, so everything was
super slow!). After that, I started to see messages like this:

"SMBIOS 2.1 table length 66822 exceeds 65535"

Basing on the discussion happening in that thread, I'm going straight
to 1024, as it seems to me that it's going to be working well soon
(especially considering that this is meant for next release, not for
7.2)

Thanks and Regards
---
 hw/i386/pc_q35.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Daniel P. Berrangé Nov. 18, 2022, 9:18 a.m. UTC | #1
On Fri, Nov 18, 2022 at 09:55:35AM +0100, Dario Faggioli wrote:
> Keep the old limit of 288 for machine versions 7.2 and earlier.
> 
> Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
> ---
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Richard Henderson <richard.henderson@linaro.org>
> Cc: Eduardo Habkost <eduardo@habkost.net>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> ---
> Changes from v1:
> - fix actually keeping the old max value for the 7.2 machine type,
>   which was the original goal, but was done wrongly
> 
> ---
> This is related to:
> 
> https://lore.kernel.org/qemu-devel/c705d0d8d6ed1a520b1ff92cb2f83fef19522d30.camel@suse.com/
> 
> With this applied to QEMU, I've been able to start a VM with as high as
> 980 vCPUs (even if I was on an host with 384 pCPUs, so everything was
> super slow!). After that, I started to see messages like this:
> 
> "SMBIOS 2.1 table length 66822 exceeds 65535"

I'm suprised you got as high as 980 vCPUs. In testing real world
configs in RHEL, we hit problems in the early 700 vCPU level, as
such large vCPU counts are also going to have very large RAM sizes
and likely NUMA topology too, which IIUC expand SMBIOS usage.

> Basing on the discussion happening in that thread, I'm going straight
> to 1024, as it seems to me that it's going to be working well soon
> (especially considering that this is meant for next release, not for
> 7.2)
>
> Thanks and Regards
> ---
>  hw/i386/pc_q35.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
> index a496bd6e74..54804337e9 100644
> --- a/hw/i386/pc_q35.c
> +++ b/hw/i386/pc_q35.c
> @@ -367,7 +367,7 @@ static void pc_q35_machine_options(MachineClass *m)
>      machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE);
>      machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
>      machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE);
> -    m->max_cpus = 288;
> +    m->max_cpus = 1024;
>  }
>  
>  static void pc_q35_7_2_machine_options(MachineClass *m)
> @@ -375,6 +375,7 @@ static void pc_q35_7_2_machine_options(MachineClass *m)
>      PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
>      pc_q35_machine_options(m);
>      m->alias = "q35";
> +    m->max_cpus = 288;
>      pcmc->default_cpu_version = 1;
>  }
>  
> 
> 
> 

With regards,
Daniel
Gerd Hoffmann Nov. 18, 2022, 9:43 a.m. UTC | #2
On Fri, Nov 18, 2022 at 09:55:35AM +0100, Dario Faggioli wrote:
> Keep the old limit of 288 for machine versions 7.2 and earlier.
> 
> Signed-off-by: Dario Faggioli <dfaggioli@suse.com>
> ---
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Cc: Richard Henderson <richard.henderson@linaro.org>
> Cc: Eduardo Habkost <eduardo@habkost.net>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
> ---
> Changes from v1:
> - fix actually keeping the old max value for the 7.2 machine type,
>   which was the original goal, but was done wrongly
> 
> ---
> This is related to:
> 
> https://lore.kernel.org/qemu-devel/c705d0d8d6ed1a520b1ff92cb2f83fef19522d30.camel@suse.com/
> 
> With this applied to QEMU, I've been able to start a VM with as high as
> 980 vCPUs (even if I was on an host with 384 pCPUs, so everything was
> super slow!). After that, I started to see messages like this:
> 
> "SMBIOS 2.1 table length 66822 exceeds 65535"

We finally have smbios 3.0 support in both seabios and edk2, so we can
use that to avoid problems like this.  So when raising the limits for
new machine types we should also flip the smbios default to 3.0.

take care,
  Gerd
diff mbox series

Patch

diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c
index a496bd6e74..54804337e9 100644
--- a/hw/i386/pc_q35.c
+++ b/hw/i386/pc_q35.c
@@ -367,7 +367,7 @@  static void pc_q35_machine_options(MachineClass *m)
     machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE);
     machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
     machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE);
-    m->max_cpus = 288;
+    m->max_cpus = 1024;
 }
 
 static void pc_q35_7_2_machine_options(MachineClass *m)
@@ -375,6 +375,7 @@  static void pc_q35_7_2_machine_options(MachineClass *m)
     PCMachineClass *pcmc = PC_MACHINE_CLASS(m);
     pc_q35_machine_options(m);
     m->alias = "q35";
+    m->max_cpus = 288;
     pcmc->default_cpu_version = 1;
 }