|
|
60061b |
From 9a7621819821ee88d2f99d6b629fd87aa9a07758 Mon Sep 17 00:00:00 2001
|
|
|
26ba25 |
From: Andrew Jones <drjones@redhat.com>
|
|
|
26ba25 |
Date: Tue, 21 Jan 2014 10:46:52 +0100
|
|
|
26ba25 |
Subject: globally limit the maximum number of CPUs
|
|
|
26ba25 |
|
|
|
26ba25 |
We now globally limit the number of VCPUs.
|
|
|
26ba25 |
Especially, there is no way one can specify more than
|
|
|
26ba25 |
max_cpus VCPUs for a VM.
|
|
|
26ba25 |
|
|
|
26ba25 |
This allows us the restore the ppc max_cpus limitation to the upstream
|
|
|
26ba25 |
default and minimize the ppc hack in kvm-all.c.
|
|
|
26ba25 |
|
|
|
26ba25 |
Signed-off-by: David Hildenbrand <david@redhat.com>
|
|
|
26ba25 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
26ba25 |
Signed-off-by: Danilo Cesar Lemes de Paula <ddepaula@redhat.com>
|
|
|
26ba25 |
|
|
|
26ba25 |
Rebase notes (2.11.0):
|
|
|
26ba25 |
- Removed CONFIG_RHV reference
|
|
|
26ba25 |
- Update commit log
|
|
|
26ba25 |
|
|
|
26ba25 |
Merged patches (2.11.0):
|
|
|
26ba25 |
- 92fef14623 redhat: remove manual max_cpus limitations for ppc
|
|
|
26ba25 |
- bb722e9eff redhat: globally limit the maximum number of CPUs
|
|
|
26ba25 |
- fdeef3c1c7 RHEL: Set vcpus hard limit to 240 for Power
|
|
|
26ba25 |
- 0584216921 Match POWER max cpus to x86
|
|
|
26ba25 |
|
|
|
26ba25 |
Signed-off-by: Andrew Jones <drjones@redhat.com>
|
|
|
26ba25 |
|
|
|
60061b |
Merged patches (5.1.0):
|
|
|
60061b |
- redhat: globally limit the maximum number of CPUs
|
|
|
60061b |
- redhat: remove manual max_cpus limitations for ppc
|
|
|
60061b |
- use recommended max vcpu count
|
|
|
26ba25 |
|
|
|
60061b |
Merged patches (5.2.0 rc0):
|
|
|
60061b |
- f8a4123 vl: Remove downstream-only MAX_RHEL_CPUS code
|
|
|
26ba25 |
---
|
|
|
26ba25 |
accel/kvm/kvm-all.c | 12 ++++++++++++
|
|
|
60061b |
1 file changed, 12 insertions(+)
|
|
|
26ba25 |
|
|
|
26ba25 |
diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
|
|
|
60061b |
index eecd8031cf..8f2a53438f 100644
|
|
|
26ba25 |
--- a/accel/kvm/kvm-all.c
|
|
|
26ba25 |
+++ b/accel/kvm/kvm-all.c
|
|
|
60061b |
@@ -2423,6 +2423,18 @@ static int kvm_init(MachineState *ms)
|
|
|
26ba25 |
soft_vcpus_limit = kvm_recommended_vcpus(s);
|
|
|
26ba25 |
hard_vcpus_limit = kvm_max_vcpus(s);
|
|
|
26ba25 |
|
|
|
26ba25 |
+#ifdef HOST_PPC64
|
|
|
26ba25 |
+ /*
|
|
|
26ba25 |
+ * On POWER, the kernel advertises a soft limit based on the
|
|
|
26ba25 |
+ * number of CPU threads on the host. We want to allow exceeding
|
|
|
26ba25 |
+ * this for testing purposes, so we don't want to set hard limit
|
|
|
26ba25 |
+ * to soft limit as on x86.
|
|
|
26ba25 |
+ */
|
|
|
26ba25 |
+#else
|
|
|
26ba25 |
+ /* RHEL doesn't support nr_vcpus > soft_vcpus_limit */
|
|
|
26ba25 |
+ hard_vcpus_limit = soft_vcpus_limit;
|
|
|
26ba25 |
+#endif
|
|
|
26ba25 |
+
|
|
|
26ba25 |
while (nc->name) {
|
|
|
26ba25 |
if (nc->num > soft_vcpus_limit) {
|
|
|
26ba25 |
warn_report("Number of %s cpus requested (%d) exceeds "
|
|
|
26ba25 |
--
|
|
|
60061b |
2.27.0
|
|
|
26ba25 |
|