qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v2 13/25] tests/vm: allow us to take advantage of MTTCG


From: Alex Bennée
Subject: [PATCH v2 13/25] tests/vm: allow us to take advantage of MTTCG
Date: Wed, 24 Jun 2020 15:04:34 +0100

We currently limit TCG guests to -smp 1 but now we have added some
aarch64 guests we can do better when running on x86_64 hardware.
Raise the limit for TCG guests when it is safe to do so.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Robert Foley <robert.foley@linaro.org>
---
 tests/vm/basevm.py | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 93859362606..dd96a6d4af6 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -553,6 +553,12 @@ def parse_args(vmcls):
     def get_default_jobs():
         if kvm_available(vmcls.arch):
             return multiprocessing.cpu_count() // 2
+        elif os.uname().machine == "x86_64" and \
+             vmcls.arch in ["aarch64", "x86_64", "i386"]:
+            # MTTCG is available on these arches and we can allow more cores.
+            # But only up to a reasonable limit. User can always override
+            # these limits with --jobs.
+            return min(multiprocessing.cpu_count() // 2, 8)
         else:
             return 1
 
-- 
2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]