From patchwork Wed Jun 24 14:04:34 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: 191675 Delivered-To: patch@linaro.org Received: by 2002:a92:1f07:0:0:0:0:0 with SMTP id i7csp637589ile; Wed, 24 Jun 2020 07:20:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwm6Ww5ZcouI/bbCIIHcHJM0dlRDa+CsQ7/wTh0viWx5W+eAJIBsu/3tQc061Kn+SsH7JVv X-Received: by 2002:a25:f20d:: with SMTP id i13mr28814696ybe.366.1593008414123; Wed, 24 Jun 2020 07:20:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593008414; cv=none; d=google.com; s=arc-20160816; b=SzsySi62mdU6ptntJFgR4zgOmfqDCslZrA3Hvy2LszJBX1a1kDT/iX1DERf2I8t2QA FWdDUWxuTJ1duuuRyByiIhYIhbPBlvukJmRosJXXEoap/4UdDh1tiqq4ORYBhN1ex3DK K51IA4B5sHjkjD5y8/WpFkN+dQh27mDGr8EIVpY+Btha6TQ57hz4OwQscooKAR1FhzKf Ftofva56p0+ND9IUjBs8nEz+U10KSm1bZ/vuqCMipa/cI1Og4i26hb/j7880FVF0rrXP 0j8NnyhtBbMAkRlBb1ydu81cXyjfRso4PIfgHN1gxqa0DXOBm7drVqv3zZIQ8krVTpIJ 0saA== 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=xcC1dEPRPSwS0guxyTrS7h54huqSdjkxAZKSe+0TYJU=; b=YZxxKD54wDI9eURktWofae6m+ZpFAeEQo9ktV5/x5sEhaGsl19RQwTXFpZ7VF3khnx IFYVk8fP+utt1TRy1s/vFuF0onNLW3nzyL9c6xNp7j18ql3XdRFwe+Rsq1yT24rAwB+J HN/JZgNCokBDHpUM58SKstphR+KRN1iZCrNGHyR8hbYdejB1/gBj3v4a8dD3KDL3+FNf MZKc1bJiybT3f5B9R+vYIyH/fgm+slkpTfQxLky++3egHk3liMC17WUMHtEv+ZmcAq1Q 594RAK1yfpmhrzBKyKf/i4eXFMNDchGoT/Ibc3HwvScKhIeeAdWjl+l0YvQdMidL4WvV Z5FQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=H6iBPqZt; 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 d38si22003209ybe.81.2020.06.24.07.20.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Jun 2020 07:20:14 -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=H6iBPqZt; 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]:36048 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jo6G5-00016z-Kt for patch@linaro.org; Wed, 24 Jun 2020 10:20:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59406) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jo61d-0005Pq-FO for qemu-devel@nongnu.org; Wed, 24 Jun 2020 10:05:17 -0400 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:35785) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jo61X-0003Xl-Dv for qemu-devel@nongnu.org; Wed, 24 Jun 2020 10:05:17 -0400 Received: by mail-wr1-x442.google.com with SMTP id g18so2434093wrm.2 for ; Wed, 24 Jun 2020 07:05:10 -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=xcC1dEPRPSwS0guxyTrS7h54huqSdjkxAZKSe+0TYJU=; b=H6iBPqZtj/NDjb+zP/vFXoXSJkBu4Ypbg9W0WZqrHWAZjn7mE8c56oQmkQTwU6zRw8 uK21bRZtmUv4ncvsHCBz7n2kc3ZzrhUQDgT/E58G6kEjQ/BBZqdrlewn8Ay+HAw6Ta3S 4HMyOH4PTJ7jfGm2MaJIweyAFbiNWOHb+IQEDmFpoGvvmlq4BgFSk64wOQZi2hfxdyns A7p9+8CklWqF63sne/90FO+KL4GDAZKjCrjaebYkEUuKnswOB9pdW8E3SZNdJBUlfosS UZruaHU7FrSj5k1ygj9Dc1VBEZSde8l7D7Z8rppaUOBmy0by9YEhtyRLO/5CjL2FblS2 c+NQ== 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=xcC1dEPRPSwS0guxyTrS7h54huqSdjkxAZKSe+0TYJU=; b=IRKjF6ginI794f8/DVQt/Y/GSF47VTt9E1+h7Gu0I2vXwRzSB9Lcp23kvmlPnV6+Mu HejsA3bXyKukdilAXZqmV6EuF4Vy9NeW0mjq/6UanLUkOmiLeTsJ5SGisP6GTOmKTzb+ f0n2evAMid3UUZ7bV1NWTrGksLRWsTDUqGdGx8iK0wIjb6cK9gaIFDJd1ky9Ax/34/86 3v0o9Tu7gm7mLD8wetccMOTmR6tcsHYs2YqaaE/fJHA6IPgreY32T94HPSEs2z4zdYyB JS7TYwfCDs+RrCK3HsbCm9EUBKPqFt62H98uYcAhBM5xBvyRfrUPsGRzfvglMsYhL5Ct LVIw== X-Gm-Message-State: AOAM532m+erVib93DP6U7WCeNIZhGWYiDvdpYtlUuS5WeumDsFGLc0My R6cpUiRcsvuC16y0/WmzMPLmkA== X-Received: by 2002:adf:f608:: with SMTP id t8mr16419707wrp.308.1593007509905; Wed, 24 Jun 2020 07:05:09 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id o29sm19603059wra.5.2020.06.24.07.04.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jun 2020 07:05:02 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 82D111FF9C; Wed, 24 Jun 2020 15:04:47 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 13/25] tests/vm: allow us to take advantage of MTTCG Date: Wed, 24 Jun 2020 15:04:34 +0100 Message-Id: <20200624140446.15380-14-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200624140446.15380-1-alex.bennee@linaro.org> References: <20200624140446.15380-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::442; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x442.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@euphon.net, berrange@redhat.com, Robert Foley , =?utf-8?q?Alex_Benn=C3=A9e?= , richard.henderson@linaro.org, f4bug@amsat.org, =?utf-8?q?Philippe_Mat?= =?utf-8?q?hieu-Daud=C3=A9?= , cota@braap.org, aurelien@aurel32.net 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 --- tests/vm/basevm.py | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.20.1 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