[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 15/40] tests/vm: allow us to take advantage of MTTCG
From: |
Alex Bennée |
Subject: |
[PATCH v4 15/40] tests/vm: allow us to take advantage of MTTCG |
Date: |
Wed, 1 Jul 2020 14:56:27 +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>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
v4
- only attempt compute a bigger default_jobs is
multiprocessing.cpu_count > 1
---
tests/vm/basevm.py | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py
index 890bbc5549a..21f46d1957d 100644
--- a/tests/vm/basevm.py
+++ b/tests/vm/basevm.py
@@ -551,8 +551,15 @@ def parse_config(config, args):
def parse_args(vmcls):
def get_default_jobs():
- if kvm_available(vmcls.arch):
- return multiprocessing.cpu_count() // 2
+ if multiprocessing.cpu_count() > 1:
+ 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
- [PATCH v4 06/40] tests/vm: Add configuration to basevm.py, (continued)
- [PATCH v4 06/40] tests/vm: Add configuration to basevm.py, Alex Bennée, 2020/07/01
- [PATCH v4 24/40] tests/docker: add --registry support to tooling, Alex Bennée, 2020/07/01
- [PATCH v4 21/40] gitlab: build all container images during CI, Alex Bennée, 2020/07/01
- [PATCH v4 20/40] gitlab: introduce explicit "container" and "build" stages, Alex Bennée, 2020/07/01
- [PATCH v4 19/40] gitlab-ci: Fix the change rules after moving the YML files, Alex Bennée, 2020/07/01
- [PATCH v4 22/40] gitlab: convert jobs to use custom built containers, Alex Bennée, 2020/07/01
- [PATCH v4 23/40] gitlab: build containers with buildkit and metadata, Alex Bennée, 2020/07/01
- [PATCH v4 37/40] gitlab: limit re-builds of the containers, Alex Bennée, 2020/07/01
- [PATCH v4 26/40] tests/acceptance: skip s390x_ccw_vrtio_tcg on GitLab, Alex Bennée, 2020/07/01
- [PATCH v4 34/40] gitlab: enable check-tcg for linux-user tests, Alex Bennée, 2020/07/01
- [PATCH v4 15/40] tests/vm: allow us to take advantage of MTTCG,
Alex Bennée <=
- [PATCH v4 35/40] gitlab: add avocado asset caching, Alex Bennée, 2020/07/01
- [PATCH v4 16/40] tests/docker: check for an parameters not empty string, Alex Bennée, 2020/07/01
- [PATCH v4 27/40] tests/acceptance: fix dtb path for machine_rx_gdbsim, Alex Bennée, 2020/07/01
- [PATCH v4 14/40] tests/vm: switch from optsparse to argparse, Alex Bennée, 2020/07/01
- [PATCH v4 33/40] linux-user/elfload: use MAP_FIXED_NOREPLACE in pgb_reserved_va, Alex Bennée, 2020/07/01
- [PATCH v4 31/40] tests/tcg: add more default compilers to configure.sh, Alex Bennée, 2020/07/01
- [PATCH v4 40/40] shippable: pull images from registry instead of building, Alex Bennée, 2020/07/01
- [PATCH v4 29/40] tests/acceptance: skip LinuxInitrd 2gib with v4.16 on GitLab, Alex Bennée, 2020/07/01