From nobody Thu May 2 12:06:56 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1621962217; cv=none; d=zohomail.com; s=zohoarc; b=hIRE9PKVQHyU25pVWuyZf5mCxYYJiIHH6PVTStNHDgy3hL7SPNhjkSf9u1lYPq0IRC5pbT5Uft1PVPH7TKU3Ss76LmC6NdWc+DFrjQVF29nBfCZQ0Lgtee0WCEe6XWvuD0L0KCk66ShM1o4OE6qarJpoolf6a/sFeXp2R83dSoU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1621962217; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=YsnEOyKs13yzRJ/WDBIfB+acAqO1jS7lPPrNoZzibNo=; b=axlRgkFGvWOtXwR5AUzP3LEgPcTwTmx/pTdngKX039D2TeTCuFeKJSqsIeAHrIzOp4wyhEM9Bm/pbnzW40+wsE93jaC4j8//VhdodLbmbVzmvH0gCfV+2daqWOs3GL5tFvExLemao53pBBS6mBPRv3pSEVi+pKjTjvICoOuPKzs= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1621962217619882.3414650779969; Tue, 25 May 2021 10:03:37 -0700 (PDT) Received: from localhost ([::1]:48490 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1llaSu-0000nz-C5 for importer2@patchew.org; Tue, 25 May 2021 13:03:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56008) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llaLS-0003CO-2I for qemu-devel@nongnu.org; Tue, 25 May 2021 12:55:54 -0400 Received: from indium.canonical.com ([91.189.90.7]:38828) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llaLL-00077h-Su for qemu-devel@nongnu.org; Tue, 25 May 2021 12:55:53 -0400 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.93 #5 (Debian)) id 1llaLJ-0004v7-OA for ; Tue, 25 May 2021 16:55:45 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id B56022E805B for ; Tue, 25 May 2021 16:55:45 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Date: Tue, 25 May 2021 16:45:41 -0000 From: =?utf-8?q?Alex_Benn=C3=A9e?= <1896298@bugs.launchpad.net> To: qemu-devel@nongnu.org X-Launchpad-Notification-Type: bug X-Launchpad-Bug: product=qemu; status=Expired; importance=Undecided; assignee=None; X-Launchpad-Bug-Tags: tcg X-Launchpad-Bug-Information-Type: Public X-Launchpad-Bug-Private: no X-Launchpad-Bug-Security-Vulnerability: no X-Launchpad-Bug-Commenters: ajbennee mslade th-huth X-Launchpad-Bug-Reporter: Michael Slade (mslade) X-Launchpad-Bug-Modifier: =?utf-8?q?Alex_Benn=C3=A9e_=28ajbennee=29?= References: <160046874518.13612.4861858859499751315.malonedeb@gac.canonical.com> Message-Id: <20210525164541.17985-1-alex.bennee@linaro.org> Subject: [Bug 1896298] [RFC PATCH] accel/tcg: change default codegen buffer size for i386-softmmu X-Launchpad-Message-Rationale: Subscriber (QEMU) @qemu-devel-ml X-Launchpad-Message-For: qemu-devel-ml Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="30919b71da718d7d3f6b69e715e9fe95f7c3c5de"; Instance="production" X-Launchpad-Hash: b9b06d0fafe597db301232e569565f4d7374b3c4 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+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=91.189.90.7; envelope-from=bounces@canonical.com; helo=indium.canonical.com X-Spam_score_int: -65 X-Spam_score: -6.6 X-Spam_bar: ------ X-Spam_report: (-6.6 / 5.0 requ) BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Bug 1896298 <1896298@bugs.launchpad.net> Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" There are two justifications for making this change. The first is that i386 emulation is typically for smaller machines where having a 1gb of generated code is overkill for basic emulation. The second is the propensity of self-modifying code (c.f. Doom/edit) utilised on i386 systems can trigger a rapid growth in invalidated and re-translated buffers. This is seen in bug #283. Execution is still inefficient but at least the host memory isn't so aggressively used up. That said it's still really just a sticking plaster for user convenience. Signed-off-by: Alex Benn=C3=A9e Cc: Thomas Huth Cc: 1896298@bugs.launchpad.net --- accel/tcg/translate-all.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 640ff6e3e7..f442165674 100644 --- a/accel/tcg/translate-all.c +++ b/accel/tcg/translate-all.c @@ -951,9 +951,13 @@ static void page_lock_pair(PageDesc **ret_p1, tb_page_= addr_t phys1, * Users running large scale system emulation may want to tweak their * runtime setup via the tb-size control on the command line. */ +#ifdef TARGET_I386 +#define DEFAULT_CODE_GEN_BUFFER_SIZE_1 (32 * MiB) +#else #define DEFAULT_CODE_GEN_BUFFER_SIZE_1 (1 * GiB) #endif #endif +#endif =20 #define DEFAULT_CODE_GEN_BUFFER_SIZE \ (DEFAULT_CODE_GEN_BUFFER_SIZE_1 < MAX_CODE_GEN_BUFFER_SIZE \ --=20 2.20.1 --=20 You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1896298 Title: TCG memory leak with FreeDOS 'edit' Status in QEMU: Expired Bug description: qemu trunk as of today leaks memory FAST when freedos' edit is running. To reproduce, download: https://www.ibiblio.org/pub/micro/pc- stuff/freedos/files/repositories/1.3/cdrom.iso Then run: $ qemu-system-i386 -cdrom cdrom.iso select your language then select "return to DOS", then type > edit it will consume memory at ~10MB/s This does NOT happen when adding -enable-kvm To manage notifications about this bug go to: https://bugs.launchpad.net/qemu/+bug/1896298/+subscriptions