From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 22231C433E0 for ; Mon, 29 Jun 2020 14:45:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E1EFF23E1F for ; Mon, 29 Jun 2020 14:45:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="K330bgeW" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E1EFF23E1F Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:59958 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jpv21-0006Vy-6X for qemu-devel@archiver.kernel.org; Mon, 29 Jun 2020 10:45:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48458) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jpuy5-00031T-QK for qemu-devel@nongnu.org; Mon, 29 Jun 2020 10:41:09 -0400 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]:52762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jpuy4-0001FI-1B for qemu-devel@nongnu.org; Mon, 29 Jun 2020 10:41:09 -0400 Received: by mail-wm1-x344.google.com with SMTP id q15so15631648wmj.2 for ; Mon, 29 Jun 2020 07:41:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version:content-transfer-encoding; bh=ATLAiO8uoee8c66oqfYdT1Zfnhx9V+nSe7jkQWl7mV0=; b=K330bgeW0TDh21sMdpaz5yV0p/OaAEHCzcgPusDNd/yVD5pFKIGY8krE7ignaTqVxm 6wmnVtiAP2MwLAsDwIRPA2po76+sEQFRlire4wRnc6Um4oYejrpWJPxbDHG0YQKtNK4v OXTMB+qw/CAoMPqf2brk/2Xl9oWXf0iQA5McKEVWnUdd2WdwQXRNCOg3yKImXmBZMcDK 2zcd/DOjl7w+OAbYKQdnUXQty8FPyHcNsJnQcJQtiw1Htrn9o3v5nL8nw5eZFV8t46EQ SC71jlrbP/910iHtZVzQu7sUdcdxtpXnwVyCiTFR2KmztHqkNkuAPi6DOxHEp7gVsNEp bw5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version:content-transfer-encoding; bh=ATLAiO8uoee8c66oqfYdT1Zfnhx9V+nSe7jkQWl7mV0=; b=jpPzxGSjSLa6ZVxhNMRIv/dHOXIGkDBXHFW2TQ4dfsDYcagKv279Itp+Iif47BY5UJ 8NV+XqXdTBEdVWPFxIuFMzlvldifCnt6c+f76Ad6Y+S6HkqrGAImO2do7K2g4NGPcm2n JUupUOiO4FahJu3wGQSEK/zbYvpl/W9afCJFPwcY84HYfdD6YmZ/IPcMS2QcesAoSjYA d0cb3Bsg9gTG19hJQfcKBVy+ASDaXksBtJOMXqtd7EWuJW9GznPbrgNs/PxAuZWyUoi7 EdlfalPLCOsn5XAGozNE7RtMTiRLNdowHvTyyRbjnrwtAdlTMA4dljBNzOo6RKtOLt0x MiVA== X-Gm-Message-State: AOAM532cfXdcqbHMUtsjumxY/6ygPYSFnR0sqWY3x3KcVYPaRY09RQv7 tIyjX5MCQAYVYbtJ2EBpZoGQpA== X-Google-Smtp-Source: ABdhPJyKDPiOTqf8IoPlxFpFGDCXpSmmBVkchVNsjE3zGsrjZiNCVwRV8iTsB+65cykt09cD4hnOFw== X-Received: by 2002:a1c:cc12:: with SMTP id h18mr16199423wmb.3.1593441665122; Mon, 29 Jun 2020 07:41:05 -0700 (PDT) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f14sm35907592wro.90.2020.06.29.07.41.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jun 2020 07:41:03 -0700 (PDT) Received: from zen (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 248841FF7E; Mon, 29 Jun 2020 15:41:02 +0100 (BST) References: <20200622143204.12921-1-alex.bennee@linaro.org> <20200622143204.12921-13-alex.bennee@linaro.org> <3ab77b68-9f5d-6b99-e226-df4abb186add@linaro.org> User-agent: mu4e 1.5.3; emacs 28.0.50 From: Alex =?utf-8?Q?Benn=C3=A9e?= To: Richard Henderson Subject: Re: [PATCH v1 12/18] tests/vm: allow us to take advantage of MTTCG In-reply-to: <3ab77b68-9f5d-6b99-e226-df4abb186add@linaro.org> Date: Mon, 29 Jun 2020 15:41:02 +0100 Message-ID: <87bll2rl35.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x344.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 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, Philippe =?utf-8?Q?Mathieu-Daud=C3=A9?= , qemu-devel@nongnu.org, f4bug@amsat.org, cota@braap.org, aurelien@aurel32.net Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Richard Henderson writes: > On 6/22/20 7:31 AM, Alex Benn=C3=A9e wrote: >> if kvm_available(vmcls.arch): >> return multiprocessing.cpu_count() // 2 >> + elif os.uname().machine =3D=3D "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 overri= de >> + # these limits with --jobs. >> + return min(multiprocessing.cpu_count() // 2, 8) >> else: > > And if multiprocessing.cpu_count() =3D=3D 1? > Seems like we should add max(count, 1) as well. As it also affects KVM: def get_default_jobs(): if multiprocessing.cpu_count > 1: if kvm_available(vmcls.arch): return multiprocessing.cpu_count() // 2 elif os.uname().machine =3D=3D "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 overri= de # these limits with --jobs. return min(multiprocessing.cpu_count() // 2, 8) else: return 1 > > > r~ --=20 Alex Benn=C3=A9e