From patchwork Thu Aug 11 15:14:05 2022 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: 596655 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:b345:0:0:0:0 with SMTP id w5csp837233maz; Thu, 11 Aug 2022 08:23:55 -0700 (PDT) X-Google-Smtp-Source: AA6agR6XGV1+zQJ/3f0olWdeVPao2hRa+gk3sud1Ip9F9bmlUTKFdiaQi0HqPPNie9PWLbYueqFx X-Received: by 2002:a05:622a:18f:b0:343:6720:7946 with SMTP id s15-20020a05622a018f00b0034367207946mr2620462qtw.155.1660231435064; Thu, 11 Aug 2022 08:23:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660231435; cv=none; d=google.com; s=arc-20160816; b=BwEi3JIgjjrVfIl56VcSOPCt1Cmgk3Z76/tqfiI+gtfxZu6h1K6mENPMiqRz8UG21O Gk/GDKVD0eWJOiMnBlxx0ahZLZm/GdHvZOU90+6t1vjrYLZ5D4AU8KUanjIishZgAcuU oAyNP3x6UAO3J6yG2LQHRVUXI40NupxpT2lofuHyY8E0VZNFr3O+0aXXMqS7eZrfI20l 52PFM/YYBVJPcvWv8mOtElhf0/HKoYCZ24N17bvLPIw0dCBo0JZ+xr3lApwyLRgZHmXA /9kPRMTVmPM5NBTFeLLRtSe6wMcMk6vOBoBsg5mDNaHNeaQscdvJCPkqzdH615PloUSx o60A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=pLiGjpmcY4FUKI2LKUSnnb/ge8pYbtK6HQOeHisM1Dw=; b=mZL0/T7ZS9yFIjCP2TVoNxS724OG3Q2lnq6BDdxMX2lSUnpLUQU8Uf79HbvcQrdBdU J/cR7WaO2EdyO3zeLVuLeFh2mqSKnU1rcDDYJFb9RVncQG97zyWhIBnVNZTkVhypRlje EtcWZUaGtY+zVpF7mxiLkFyQ4Nm3DoFrIkOXrXoitEtyYxujHB6+Hj4KTOjOT/uXvQ6i M1LCE9d4qgKHEbqAs6XpY+DV5k9KlFokIiYw8PDX0aAk1K2bUvYDVN2cYHdsRRkR1+1f hTsUXrCNer7P9BOWXiZUoIXzv6bV3ylsi6mbUHZiRWt8gW9362GFhrCRfV8gqN84Ryed l5mQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mym+Kvn0; 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=pass (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 f10-20020ac8134a000000b0031f0cfa7680si1536354qtj.219.2022.08.11.08.23.55 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 11 Aug 2022 08:23:55 -0700 (PDT) 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=pass header.i=@linaro.org header.s=google header.b=mym+Kvn0; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:50792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oMA2M-0000Gm-J9 for patch@linaro.org; Thu, 11 Aug 2022 11:23:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41726) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oM9tJ-0005Bf-PN for qemu-devel@nongnu.org; Thu, 11 Aug 2022 11:14:37 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:39660) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oM9t3-0005fl-FJ for qemu-devel@nongnu.org; Thu, 11 Aug 2022 11:14:32 -0400 Received: by mail-wr1-x42c.google.com with SMTP id h13so21718597wrf.6 for ; Thu, 11 Aug 2022 08:14:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=pLiGjpmcY4FUKI2LKUSnnb/ge8pYbtK6HQOeHisM1Dw=; b=mym+Kvn0JssYO4OwKXMv+XxwcXnTiROrrf0KOYj07TqyXoTMHTll9gSAbC0UF/fT9U 0XqWZ/0ie7/fGTx0kpM3/TvaWc1FmtGMcjQJa9xJBgeVzllyGf8sB+XiP6yjPocJVtfS Fuox+FHR7blRJnzHEFgTrfyhJKWaRDwIXAknO5GF2fKxaXU6Pb50Ee3EXmbvuao7A/AT M+Z7IYxxTobaLujlHxoaDct1J9vBge4xoiBbGcBSt9ppeXO/E8QriGZyIHzfWnbA5Iov YQqG9inaFnnN38L6wuaJZgCBhBTlPULLvgQciUWco/lQpJsBIsfJunbTpBpZgycB5/lQ 8eUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=pLiGjpmcY4FUKI2LKUSnnb/ge8pYbtK6HQOeHisM1Dw=; b=RVn3mK3MzKL0fPfIGtvPsJtzov87R1EfIS331YxMuRH0bCPSO8klsy9EamuwL9fFzq y+cHksbTLBfvATi3rLkhAh6A/UAQ0HOlJWl3w9of76c3mT+OkOKOl1zBziecIOs85UFt 8mYjel3ZmH5Pjx8s6bR/2BioGDFE/UZzqR+yGZkiKIBIpd5n+JrO07jFj936xmF/eLIa DtsPN4IiftoWIqqg/4La3mbF7Zj3XtIEGxnbxJmdEzRkHpc/4nHmLqgRmuYR6vHHzEOw fFra4f/7rZQbnhAqVXwd76LC2fm9FTHFfGXwy+lIb72I4l9Xqn21wRR2HeuqvnGlyCD5 jkiw== X-Gm-Message-State: ACgBeo2DJHI0mJGlGE6yIaWWOnK+qNq1SuFbl3e/QQnwKTl4CQ0aBU2R Hli+uRKW5pGggrPVpzYh2+IHkA== X-Received: by 2002:a5d:5a8d:0:b0:21d:6d69:ca03 with SMTP id bp13-20020a5d5a8d000000b0021d6d69ca03mr20106736wrb.135.1660230855268; Thu, 11 Aug 2022 08:14:15 -0700 (PDT) Received: from zen.linaroharston ([185.81.254.11]) by smtp.gmail.com with ESMTPSA id b2-20020adff242000000b002238a1f6b74sm2627088wrp.37.2022.08.11.08.14.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Aug 2022 08:14:13 -0700 (PDT) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 4F8E31FFB7; Thu, 11 Aug 2022 16:14:13 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= Subject: [PATCH for 7.1 v1 0/8] memory leaks and speed tweaks Date: Thu, 11 Aug 2022 16:14:05 +0100 Message-Id: <20220811151413.3350684-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=alex.bennee@linaro.org; helo=mail-wr1-x42c.google.com 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hi, I've been collecting a number of small fixes since the tree was frozen. I've been mostly focusing on improving the reliability of the avocado tests and seeing if there are any low hanging fruit for improving the performance. The linux-user patch is a v2 fixing the obvious de-reference I missed in v1 and prevents a memory leak in highly threaded code. Laurent may want to cherry-pick himself if he wants to re-run the LTP tests before merging although I hand ran the ones he mentioned failing and they all work (for me at least ;-). The CPUClass caching patches are a clean-up from my earlier hacky RFC and shave a bit more time of the execution of particularly heavy IO executions. The same is true of the SSI fixes. The avocado fixes are band-aids over a wider issue which is we currently can't cleanly wait for prompts that don't end in a newline. However they should improve the situation of stuck tests a bit. Finally the trace_dstate fix is some left over work from the TCG based tracing that was pulled earlier this year. There is still the question of what to do about per-vcpu trace points but they are all currently called direct from C code so don't concern an TCG code. I'm still going through the > 30s avocado tests on an --enable-debug build. The two behemoths (BootLinuxAarch64.test_virt_tcg_gicv2/3) should be ameliorated by better TB invalidation which rth is currently cooking up patches for. I've still got to profile BootLinuxS390X.test_s390_ccw_virtio_tcg, ReplayKernelNormal.test_x86_64_pc, BootLinuxConsole.test_ppc_powernv8 and BootLinuxConsole.test_ppc_powernv9 which are kings of the check-avocado time hill to see if there is anything obvious there. The following patches still need review: - accel/tcg: remove trace_vcpu_dstate TB checking - tests/avocado: add timeout to the aspeed tests - ssi: cache SSIPeripheralClass to avoid GET_CLASS() - cputlb: used cached CPUClass in our hot-paths - hw/core/cpu-sysemu: used cached class in cpu_asidx_from_attrs - cpu: cache CPUClass in CPUState for hot code paths Alex Bennée (8): linux-user: un-parent OBJECT(cpu) when closing thread cpu: cache CPUClass in CPUState for hot code paths hw/core/cpu-sysemu: used cached class in cpu_asidx_from_attrs cputlb: used cached CPUClass in our hot-paths ssi: cache SSIPeripheralClass to avoid GET_CLASS() tests/avocado: add timeout to the aspeed tests tests/avocado: apply a band aid to aspeed-evb login accel/tcg: remove trace_vcpu_dstate TB checking accel/tcg/tb-hash.h | 6 +++--- include/exec/exec-all.h | 3 --- include/hw/core/cpu.h | 9 +++++++++ include/hw/ssi/ssi.h | 3 +++ accel/tcg/cpu-exec.c | 6 +----- accel/tcg/cputlb.c | 15 ++++++--------- accel/tcg/translate-all.c | 13 ++----------- cpu.c | 9 ++++----- hw/core/cpu-sysemu.c | 5 ++--- hw/ssi/ssi.c | 18 ++++++++---------- linux-user/syscall.c | 13 +++++++------ tests/avocado/machine_aspeed.py | 4 ++++ 12 files changed, 49 insertions(+), 55 deletions(-)