From nobody Tue Dec 16 06:23:01 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=1582918038; cv=none; d=zohomail.com; s=zohoarc; b=gaq40Pl/wZ8GpvaIa+wyej6UlnQ1NGKZLm0wvQnkcSX1plglmgL2rlULaUT3jHno9W9AU886Tiuu3209wax/0pOd32jA0izmu16TB18I9Xc44g+4ZrabfeQGrq5YeZUb4D3ehmQw3aQpcz3mKOaUqROwcmj7bG15UZRC78BEAVw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1582918038; 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=60CqZg7BZfR1xnQfWxmp/hW3ExnnXGerh7BjsN5qqsw=; b=R678WwaBLn7bH1dOtBFyHOVnR14Ah3QedNECG5TzsxOsABvrrfQ4Ssa/YlAQmeo5nMOxwwk5+ol6fxLNy1ffwNrSxSVKuztkncUWQOyqe/5TbxSFNozU0uvQK54RJWJPfdsqoxn879OieLyq0n6LzK7r7bVqJeLB1Su8ucDzbRI= 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 1582918038049866.461583118223; Fri, 28 Feb 2020 11:27:18 -0800 (PST) Received: from localhost ([::1]:53002 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7lI3-0007Ws-18 for importer@patchew.org; Fri, 28 Feb 2020 14:27:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40164) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j7lFG-0003Wx-8a for qemu-devel@nongnu.org; Fri, 28 Feb 2020 14:24:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j7lFF-00060J-8M for qemu-devel@nongnu.org; Fri, 28 Feb 2020 14:24:22 -0500 Received: from mail-wr1-x442.google.com ([2a00:1450:4864:20::442]:41079) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j7lFE-0005zE-RV for qemu-devel@nongnu.org; Fri, 28 Feb 2020 14:24:20 -0500 Received: by mail-wr1-x442.google.com with SMTP id v4so4268845wrs.8 for ; Fri, 28 Feb 2020 11:24:20 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id f207sm3486974wme.9.2020.02.28.11.24.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Feb 2020 11:24:17 -0800 (PST) Received: from zen.home.arpa (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 8D57A1FF8F; Fri, 28 Feb 2020 19:24:15 +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=60CqZg7BZfR1xnQfWxmp/hW3ExnnXGerh7BjsN5qqsw=; b=wQJ7tLmCk2n6mJft+pmcYUL7yRG61S/J3nvLZjtJVivba+it7vyCmCTgHl+MdHOHmj 38YfbaeRGc62Ya7EuTgkn/lkXJnG4c2TGF1SIIPHZEAfVfrY711uSRPW4HguVAhaCJ/C EacS9J0R6MOrcMijLoc40JB+6P6/afgThuWmImSCpiicerT/fEAVXu8QnaARSmeEtoZZ PbfTVNgN57AkZiCky3EvvRS1jKubejcLrORGY9eAUb5lzJeT79EopSP8nyYOQjxK+6yn Aplhg9Npj3xm176+gAfwcGbG4amf+qoN+LSrk7z0RpT7U08IJyMdYExd4+YID1QP53MY YzQw== 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=60CqZg7BZfR1xnQfWxmp/hW3ExnnXGerh7BjsN5qqsw=; b=Hkg2CwtWQLmsu7Z6iPw3wheA3jkNAGbUOvfGX4+1FFg44rJIrWYlJtOpH1yDo5W4TV 6XeJMHj9esXI3X2nzIkp4Xa4cCl2iPVIJIXvLoHzk6JvVBkjHCb8s+mWsYcalyvWjVY/ O8BzcP/fwkcJSCYdjt2jQtzRyiev/dgPUIqJ3SrNziJr/BQvvgOPiTt5tUw4hza8PQd0 QhvmaxiSlLTZ6icyQTouDBheFv8aSQbgjWyvzuz2sszuc3puO0Aa4/tULPe0AFk03IXs C1Bbz8UiZbGtiLkfP2fJy9hc3sg1kzstL7EhUBs1Zr4Yu72mP1q5UB2cRCoNHTp8NAth d+4Q== X-Gm-Message-State: APjAAAUvrktGUuxmr/y0uXhliQZ1TKtrMWhrce7/5NaG+srOu9f6LMJF Hp0vOre37EKh72XBVH4+OCQFsg== X-Google-Smtp-Source: APXvYqwgvtxjGhdW0mhDrhkJSbzRBHz+1Af3ub82MTc8010b5Uzv7Vugw03T8/4oIf4SG+X0yXucyg== X-Received: by 2002:adf:ded2:: with SMTP id i18mr333585wrn.173.1582917859408; Fri, 28 Feb 2020 11:24:19 -0800 (PST) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Subject: [PATCH v2 2/4] accel/tcg: remove link between guest ram and TCG cache size Date: Fri, 28 Feb 2020 19:24:13 +0000 Message-Id: <20200228192415.19867-3-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200228192415.19867-1-alex.bennee@linaro.org> References: <20200228192415.19867-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::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: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Richard Henderson , 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 Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daud=C3=A9 Cc: Niek Linnenbank Cc: Igor Mammedov Reviewed-by: Niek Linnenbank --- 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