From patchwork Wed Feb 26 18:10:20 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: 183920 Delivered-To: patch@linaro.org Received: by 2002:a92:1f12:0:0:0:0:0 with SMTP id i18csp3457542ile; Wed, 26 Feb 2020 10:14:26 -0800 (PST) X-Google-Smtp-Source: APXvYqwwp8sEKnKAyysK6rP8Vdvko1ekpTYlIvE3K2qjMz6DpNmEAi5xR3CY2Njt9agB/nc5wJp7 X-Received: by 2002:ac8:450b:: with SMTP id q11mr75869qtn.212.1582740866563; Wed, 26 Feb 2020 10:14:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582740866; cv=none; d=google.com; s=arc-20160816; b=Dr7stVK6P/68m8jcB5duMHUOBr+ZhoE3bniLt+/2CCrCnS81aFV5Q3maOq1ABNX3R1 MOBev2mg8gsj8mrfjYEHHcSPeK11VADp5SEpmQOOgPJ6h+MRDuMBGhgJ3+orYCZbLTaY 4SU38oXVQpS7p2dgd8PPqbaf1D9y3iGKnmCnEf02kMbyIpZGuVxtQ/VvnDpv++s7Zl0i WurEM81Ve0oiA8LAeGQJlgsKU35GjLTf7hJXSsNcC9QCk0FQh+YcSnIzn30zuBcylpSG b4ly0ifySo7eNkhG3vCVjMJ3SkC7ZPYSKP0OZTM7G4A0+l9wkwKG/5roZzpfL0GHGM/2 Zm4w== 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=mGdhokziaFlD24j2e180ug759eZelaxuW6pu6HeYdT8=; b=l4waykRmOQx6J/pxMf6zZ/LEIgw3Ro6T5xqysI/bmRWf7i/DNraRplCLVW1lnYzS87 EqPLdUM8i+t0IXllvWcwZS7N5GjHO49ZMOaSENTCKHRFCD5JKZBrBoz1TUOiqeD4sYLA z0Sur8y0Ltlsp4J2y+Zs1vBXADUsm6M5gPXJGJpKFCw5pr7d1IlcI1v6pD8XRAUHThNu bU+rdFR1h+hT/kN1otqB7pdRrjguF/LNz/VRqZ+SBunYE0X8JazyadPq6zhwE4hA2eMm hf5ULuoQ9a3wZoDcKjTOb2IYqhPH1YGP6dZG7YwerbzV6rtAYNAWDW3XPGVkYj7GBPNk Ej3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=S6PCTofg; 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 d30si121083qtm.193.2020.02.26.10.14.26 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Feb 2020 10:14:26 -0800 (PST) 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=S6PCTofg; 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]:48418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j71CU-0005XP-4H for patch@linaro.org; Wed, 26 Feb 2020 13:14:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40732) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j718h-0007Gy-ED for qemu-devel@nongnu.org; Wed, 26 Feb 2020 13:10:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j718g-00068Y-FG for qemu-devel@nongnu.org; Wed, 26 Feb 2020 13:10:31 -0500 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:37061) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j718g-00067j-9M for qemu-devel@nongnu.org; Wed, 26 Feb 2020 13:10:30 -0500 Received: by mail-wr1-x442.google.com with SMTP id l5so4305157wrx.4 for ; Wed, 26 Feb 2020 10:10:30 -0800 (PST) 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=mGdhokziaFlD24j2e180ug759eZelaxuW6pu6HeYdT8=; b=S6PCTofgeYtP2Wsm4aYo/W9iKZZgEEkaoEfhMSkuk3t1Gw1gr4k6Ei0rXViBm7YXON k9MUApcURl81lTk0y1GvkekR2TQE8wka0qKAdw/rKYg96Hou3ySxw57m1QJMBbW/UYiw Yg9teIYwwZHdAo8cKaMy990lCu5CSR9f4+6xxk7E/YhcPnfi8z5SO+hhbgpIGNuD+dji V4AHxWNrEWkaMR5Aij9+ZPs4jjuWRketPCY1enCZ4u5ZkfkZw4Zy8HdNd412kXlNg+6c TBSZj0eo5h8i9LPuWlxK2g2HAJ7thZc9oY+v9dwOtqxxw/gJkY6bS65f6l5OSwcuSMD/ CSOA== 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=mGdhokziaFlD24j2e180ug759eZelaxuW6pu6HeYdT8=; b=aZUefVf4gNd1AHE2vepf93jCyrlhhlm9GJ3Ll+rPQEUdwgm1AE/9yUN+Ow55wKCcbB s87yMsvjb9julad906z+rK99vPfTLMsEG1Ygr/NdJx+3YmU5Gms9o9HjxfpGEoW7KSMy wTFILWzkDGXcoOkZ2nl2vyaZbG4/tCDdxkeDAu0qQl9MQSt643B1mVuCAfNNebrjRmRb wU0TR9br33d22IZDOJBXPjBDwLKegbJ14/dn7k7zfKaZQU8m75153YQzEJBTh6LA2I4J ucnc6088BhpPMMfbOunysPib9iPSCJLQASUoTzFweRvuCH5l5KZpOwVvMumuALdYOUiP 5JKQ== X-Gm-Message-State: APjAAAUhCFy/3U3+HDTxZaEuoU0aZzBul5FrWuNpprYkKJVlaSe91P1s aXcJmDv4AspZGnPz9D6YZ/hhjQ== X-Received: by 2002:a5d:440f:: with SMTP id z15mr6669505wrq.420.1582740629273; Wed, 26 Feb 2020 10:10:29 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id n5sm4223973wrq.40.2020.02.26.10.10.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 10:10:25 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 326FD1FF91; Wed, 26 Feb 2020 18:10:21 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 4/4] accel/tcg: increase default code gen buffer size for 64 bit Date: Wed, 26 Feb 2020 18:10:20 +0000 Message-Id: <20200226181020.19592-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200226181020.19592-1-alex.bennee@linaro.org> References: <20200226181020.19592-1-alex.bennee@linaro.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::442 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: Paolo Bonzini , qemu-arm@nongnu.org, =?utf-8?q?Al?= =?utf-8?q?ex_Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" While 32mb is certainly usable a full system boot ends up flushing the codegen buffer nearly 100 times. Increase the default on 64 bit hosts to take advantage of all that spare memory. After this change I can boot my tests system without any TB flushes. Signed-off-by: Alex Bennée --- accel/tcg/translate-all.c | 4 ++++ 1 file changed, 4 insertions(+) -- 2.20.1 Tested-by: Niek Linnenbank Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Tested-by: Niek Linnenbank <nieklinnenbank@gmail.com>
 
diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 4ce5d1b3931..f7baa512059 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -929,7 +929,11 @@ static void page_lock_pair(PageDesc **ret_p1, tb_page_addr_t phys1, # define MAX_CODE_GEN_BUFFER_SIZE ((size_t)-1) #endif +#if TCG_TARGET_REG_BITS == 32 #define DEFAULT_CODE_GEN_BUFFER_SIZE_1 (32 * MiB) +#else +#define DEFAULT_CODE_GEN_BUFFER_SIZE_1 (2 * GiB) +#endif #define DEFAULT_CODE_GEN_BUFFER_SIZE \ (DEFAULT_CODE_GEN_BUFFER_SIZE_1 < MAX_CODE_GEN_BUFFER_SIZE \