From nobody Thu Nov 13 22:09:58 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1582740761; cv=none; d=zohomail.com; s=zohoarc; b=JS3d+RMo5IiQM6ZYkQfSx+Ins8Uw4rBbmWfo/BkK2S1YC19JCexiZNL37E9nzrmjyzun0PUaFMCFCK8gKR3v08Jh7nYbjeshCgIW/e0SjvdDT+t0mbvlAt4Xqzl9psBl5M5Jpqm9h0sNlK4x5V50byFaqAGqvRSl0xku9w+rwtw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582740761; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hTO2TJKTVn6zYRsBqCfNS47JQf5FFH1MtA261qT+XBk=; b=AhtX6lu+MJp7ZLsFVAIcgu2MWwoNglKq8gfIpdX5u5lCUEh6DMql6juLsrmA/VMiQ9+8ccN1r5xLYrIvy1dw9O4/YwLEgtVGz2VNXWD5k1esGB/XaPQjZKnia0CvvT4EBBmNioEmaZPQDID57fezOfGRbrvF1KdRRS1DjAE0CoA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1582740761409755.5032022384631; Wed, 26 Feb 2020 10:12:41 -0800 (PST) Received: from localhost ([::1]:48362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j71Am-0002Cx-A9 for importer@patchew.org; Wed, 26 Feb 2020 13:12:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40661) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j718d-00077h-UN for qemu-devel@nongnu.org; Wed, 26 Feb 2020 13:10:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j718c-00065A-PU for qemu-devel@nongnu.org; Wed, 26 Feb 2020 13:10:27 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]:50577) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j718c-00064S-Iu for qemu-devel@nongnu.org; Wed, 26 Feb 2020 13:10:26 -0500 Received: by mail-wm1-x341.google.com with SMTP id a5so284128wmb.0 for ; Wed, 26 Feb 2020 10:10:26 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id z10sm3867301wmk.31.2020.02.26.10.10.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 10:10:21 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 08C411FF8F; Wed, 26 Feb 2020 18:10:21 +0000 (GMT) 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=hTO2TJKTVn6zYRsBqCfNS47JQf5FFH1MtA261qT+XBk=; b=XhZKl9/y1LXlkcu4qnQDHpOSISFfZXX5rZTkBK3XsCMR7LgI/JUaD75+mDloiGDs+T DXpIrXPkXY90+FfirwZzGMYnna1qoqIjQnYRFbTq9zNYGmSXJxAe2cV4Sx+ZFWeSQ5uy 6Fg/RNivdqoJT3z0YPHlO+C4z5UpSDqsGFJWvYKm0BUfKNes/OEc16rr6bYiIlByZ2Yv XOw/lf2pQRxWwVkFScpLm274JOJ8tBR7W/SyED7t7ofrxHj1Y4Y8QtjfxcYfM4z05RFa eWK+wv+PK3az5Ez5I6MD6LlHHe8PAV4Y1Loejl1G34+ceN0QVFM1IY6D3uj+11egqODk Z5/A== 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=hTO2TJKTVn6zYRsBqCfNS47JQf5FFH1MtA261qT+XBk=; b=rA/ZhhilYWaW64TjBv/2haZY/lwBFyMzommhW/4ULX+VQKmOqhgrHvi4LX8j+PiSKc U+IMGxU/sdsiWpETj9XO0r7D9c7aqjKzyp+cWrMP+V3RwTqoq19/SngArF1TisC/TRVd AUWLKfrpJ5RZf5YgcYlcHNmu7D3oeGH53BWGou0CBYX03TQ6gymBTt6KtNxOAVO2boXo h9aoMgfpb9Dd+WmjrPP7CQKPI3lyt1NHNxHqIr9tNy5Bago2gRWgoIkPk3EX3dDLrDjT veCK5e8Whd7V0ZpulvQv9JB6jewfHNCtlIiFTLFPWDgZo6TfuJ49nv9gIEVyiJUPO38z xLow== X-Gm-Message-State: APjAAAWTYvsqnIcl+X7ViSJOnJOq0kaP8ino59LK3KX1zK5Ug1FO3rlI e8XMeKwDs3VUqurVSlZ0a60qWQ== X-Google-Smtp-Source: APXvYqzQgMdzyv1kRIJ0A5xZ+8PIob9SLYhIZRVPTr+Ie+CbSKOG8v5VAmbmd0Cdfaay52qGOEfKSQ== X-Received: by 2002:a1c:a4c3:: with SMTP id n186mr110130wme.25.1582740625545; Wed, 26 Feb 2020 10:10:25 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v1 2/4] accel/tcg: remove link between guest ram and TCG cache size Date: Wed, 26 Feb 2020 18:10:18 +0000 Message-Id: <20200226181020.19592-3-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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::341 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: Niek Linnenbank , qemu-arm@nongnu.org, Paolo Bonzini , Igor Mammedov , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Basing the TB cache size on the ram_size was always a little heuristic and was broken by a1b18df9a4 which caused ram_size not to be fully realised at the time we initialise the TCG translation cache. The current DEFAULT_CODE_GEN_BUFFER_SIZE may still be a little small but follow-up patches will address that. Fixes: a1b18df9a4 Signed-off-by: Alex Benn=C3=A9e Cc: Niek Linnenbank Cc: Igor Mammedov Reviewed-by: Richard Henderson Tested-by: Niek Linnenbank Tested-by: Philippe Mathieu-Daud=C3=A9 --- accel/tcg/translate-all.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 238b0e575bf..5b66af783b5 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -938,15 +938,7 @@ static inline size_t size_code_gen_buffer(size_t tb_si= ze) { /* Size the buffer. */ if (tb_size =3D=3D 0) { -#ifdef USE_STATIC_CODE_GEN_BUFFER tb_size =3D DEFAULT_CODE_GEN_BUFFER_SIZE; -#else - /* ??? Needs adjustments. */ - /* ??? If we relax the requirement that CONFIG_USER_ONLY use the - static buffer, we could size this on RESERVED_VA, on the text - segment size of the executable, or continue to use the default.= */ - tb_size =3D (unsigned long)(ram_size / 4); -#endif } if (tb_size < MIN_CODE_GEN_BUFFER_SIZE) { tb_size =3D MIN_CODE_GEN_BUFFER_SIZE; --=20 2.20.1