From patchwork Tue Jul 7 07:08:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 234928 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp657585ilg; Tue, 7 Jul 2020 00:19:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz1BzMMTr9TsxlMGeO2o4w9FKddywS83QjjKDvNzN057ksLMCW4NUFRlolXFqEBIEKSufSV X-Received: by 2002:a25:c445:: with SMTP id u66mr21162028ybf.277.1594106346934; Tue, 07 Jul 2020 00:19:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594106346; cv=none; d=google.com; s=arc-20160816; b=oVvzWIApJ+B0LZESheNxQpz7fnXtcqEVMcqI1hdB5MSZrE8IV00EEJl9zs3CnolV5F VWT4YB2pH8qaXjSfFJFG6y6K9qklVxr8tUJHHu9rJS5jjfnSKI+vgdhwgZhDpfzOZsCM vbOq8I2lQp8Oa21fRvGeWJiHvIwh4JYta4No7JaY0GEXoIlk7lxwmvRS2G1LZhL4fwEk TT6kR6Lzik6ZsbCQetLkWHntmhSx3pU1VNZz5Y4nfmHsDN3o/M5vgsWqYOyTkHi9tLqQ HEMjay1okLJsKgL877oQ38BySIOWJ22fX4xWC9saPW/sIq+FKRDuLHMZ+59kdB7RNKrc eIlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature; bh=+0XGMSv3TRBxSJ9urnyaVy5rxmKlhWwkj3bUWyiYszA=; b=Ts5WaGb0XaIBK/4dquwTMNRL5t4XsmqXWc8zju96lixH+AOvYwqzbaXRSNS6KD/D0Q u3VFI2NEL4I70AgQyvrE6q2+z5rvSTdmiK0p32daSlQvzZICx31nsegA2o4zdclc80cq 0cCgQk3GeFz0vKH4hephIOtS02QHsJ73919u6l+MWwJzBCvKrBToCD/sQ5chwrp+GXmz y9ir54KxnpkzO0HaKDpNO4R3xVxZ1GuU+d8IgRmGyOtJTqZznYNJZL3jheJnNSQIQ1X4 9VWDfBVkaQiDjcpgyCDc8L3oa9WZ7Eh3toUgzvcu0MQ0WXb49bmp8SDhKcyTCsDoXNvu /4TA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=E5hT2WR9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id g4si22420022ybh.219.2020.07.07.00.19.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 07 Jul 2020 00:19:06 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=E5hT2WR9; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:48780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jshsg-0005zJ-Bh for patch@linaro.org; Tue, 07 Jul 2020 03:19:06 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jshjG-0004yR-DN for qemu-devel@nongnu.org; Tue, 07 Jul 2020 03:09:22 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:33746) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jshjE-00046Y-P0 for qemu-devel@nongnu.org; Tue, 07 Jul 2020 03:09:22 -0400 Received: by mail-wr1-x42c.google.com with SMTP id f18so35909508wrs.0 for ; Tue, 07 Jul 2020 00:09:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+0XGMSv3TRBxSJ9urnyaVy5rxmKlhWwkj3bUWyiYszA=; b=E5hT2WR9I5bKLy+mT2XtTMUCmIJcWX/FjdORNIjdTbCjHTzA2f+k/Yl8hD23prS/o5 zqkysJG8jE7vZUBrPMVRR4R0EgAoMkDI/JX4ILUlPTeoCDn8QzrET34ROJToZzJt2zxt EN2DDqFXwmG6DcW9GkuJxRyJPPo6Kj+ojHCJ+qJfQExw7qxPNcmN2jqMgPzMYEuDirSx ttZtsfe62qROvPoiv79KrVZtOOijzELEebEmzhBPvTYY4envK3KnAKdCF/t9sBVEKCMo bnqXTXIqGRRCMtD4ZTirEK3aPbnhdxD/0sNxZnoeD//nZ0HMv4iddj6synJyS6C/H3O2 yblw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+0XGMSv3TRBxSJ9urnyaVy5rxmKlhWwkj3bUWyiYszA=; b=ATE2VaL3q22ZHHRUQ2jdgicCfUPjJ6kWobQOT93l0G1OrxpBCquHo9uTU6fAY6sZAu c+nJIRTrE0znJfIlBPUBmk/2wf3wAcVjfJ3FXKXNpl1GN+pDypWDEGKznXBtR/35ed4E lkV/OnAUXN9xFiWoxIQR0MCe+GqlYxFnmkZ+zSbffo2q1m0QFC0eOhZlTwISMo4v/iBn wuYXCR3qWSdXdD46F+0RFIZIMHlhuq5hS36VyCkXPKuFOylZkrr4fyWtRr844GjGvWqa LhA7b4fFzoJwVhBN3kQtTb5XougDZfrmPxMrjIE30659+76HbGp94Db7L0WMAvZ1uNj8 kTDg== X-Gm-Message-State: AOAM532vMS5pTKnOo+KoySzHOnDyYlf4HIKllsRgP5cgN08p+tEDhyuz UDpSg+3Y9s/8NyVa6PXCW+TJ8BGhQnQ= X-Received: by 2002:adf:e6c8:: with SMTP id y8mr55612131wrm.40.1594105759396; Tue, 07 Jul 2020 00:09:19 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id 33sm28737937wri.16.2020.07.07.00.09.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jul 2020 00:09:12 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id BCB221FF9C; Tue, 7 Jul 2020 08:08:59 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: peter.maydell@linaro.org Subject: [PULL 13/41] tests/vm: allow us to take advantage of MTTCG Date: Tue, 7 Jul 2020 08:08:30 +0100 Message-Id: <20200707070858.6622-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200707070858.6622-1-alex.bennee@linaro.org> References: <20200707070858.6622-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Fam Zheng , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org, Robert Foley Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Robert Foley Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20200701135652.1366-16-alex.bennee@linaro.org> -- 2.20.1 diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 890bbc5549a6..21f46d1957d9 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