From patchwork Wed Feb 24 16:58:06 2021 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: 386867 Delivered-To: patch@linaro.org Received: by 2002:a02:290e:0:0:0:0:0 with SMTP id p14csp528776jap; Wed, 24 Feb 2021 08:59:16 -0800 (PST) X-Google-Smtp-Source: ABdhPJxVkONTJGbXaRj3/lBNfaxq2hFwzKpYqxPFfovcyblYaqcO3fx5ply4UfwfJ+hNyKQZxNt2 X-Received: by 2002:a92:ad0a:: with SMTP id w10mr23867288ilh.235.1614185956664; Wed, 24 Feb 2021 08:59:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614185956; cv=none; d=google.com; s=arc-20160816; b=Zorp6v0lNVn1gypGwANrtUXF/5o641pPsFFi/Sxq7e1uO5pg1bw192sfGEAI2wBrqa xrNFxXBDtq7Ts/YWge67kYIH57dgZvlq1s5mBRLJ+akjkIRh42fFcej+rI8DmucY6l9A ZMXKOp7RLMQmCx9TWMH7ef/HbAJzkS1fVWnjHNYLWi78So3pgveEJOhA3h1v0a1E/hja Zu1/LRI0iEdsO8EuPHyVZl9BVxKG2VcVM53nmNKT2e/zAj1ITg3sQ9jYB5iV3wiPxpAn LYKq3+ww4oTfuw940Su/zM2UMUqrT97blEr9KlZ/8NkUu+UbiXdQvw/xhcWDOz929dJ0 u7Rg== 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:message-id:date:subject:to:from:dkim-signature; bh=WofdIg2a7AJVUPO/DtIgH8BRfzeblCXKDRSqcTtVJGg=; b=wLcKkxiXB4zM/schDwf1cRSX3leoiYgueAOn+m+zYBbCttTDYAktcB0T/9wYXZJ5w5 t0Tox4EBbQHRg5yrIbuX8aTYb848jqAy6qNXXt2CWUfOhC7cgfzYY1xaUwiZ8+taVXVE dYYEMe+SPRRr3ZsoanFrDvkuUtBL7iNyYWfoqJSwj0ERkaBdVk4FoQxw3Ztk68Sn0i71 WmdDqp7n/yhSz/FPJd1Q+8maUwM9xBz+i87+ztcUfmAeJJPTWOhyCc6GXg/Lkp9VG3MR mjlbWPLdFAKQMm59vd+PUwzcA6XB9kvAKq6KaLUPsk0wid3zhLhz/cOvLsCyv2uLWVVV l5wQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=v8jpmdqx; 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 t136si2430982iof.90.2021.02.24.08.59.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 24 Feb 2021 08:59:16 -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=v8jpmdqx; 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]:57082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lExVM-0003II-4Q for patch@linaro.org; Wed, 24 Feb 2021 11:59:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:43966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lExUT-0003GC-Su for qemu-devel@nongnu.org; Wed, 24 Feb 2021 11:58:21 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:44571) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lExUN-00072n-K4 for qemu-devel@nongnu.org; Wed, 24 Feb 2021 11:58:20 -0500 Received: by mail-wr1-x42c.google.com with SMTP id h98so2552703wrh.11 for ; Wed, 24 Feb 2021 08:58:15 -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:mime-version :content-transfer-encoding; bh=WofdIg2a7AJVUPO/DtIgH8BRfzeblCXKDRSqcTtVJGg=; b=v8jpmdqxHkXIzH38emGAQYSeZF2lqsGlQ4WCWRhQ6qKLhSvKPfsMgw89LStiQrCGUV txpge6UAs87e6X+Qw6CUxV5A3nzeJP6Pl+UV9gqMypXpHtIEgiE71wADHXJzC03yDC0P ClHuRuUBq0FKnqcg3uI3ikijPZPhHFarV0d3oXTfl3N56PKlNsebB+ar/KOZA3NQiBmh A7jehbBSYC9MORhHMBL+WLutGwvDzCktSJOZEolNDK9unFKZecDR6DqerRMSj6sDnBh+ f2Y7svVaAvqTR3ZmQunEM5GZSnztko1xpG5KX0clHkpCq8DYkuAf6+B1LVpoRgzKhuqu gdlQ== 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:mime-version :content-transfer-encoding; bh=WofdIg2a7AJVUPO/DtIgH8BRfzeblCXKDRSqcTtVJGg=; b=H0iNSnrTP1oYRF4Hv+eQY5HpKxI7XJrSEljnDG0tI4ztfR9+uAYGvGv7+yTCw5qFsk exyvwkMWWtez91D0nZENmiFXMkMuX3SCAn59ouCn3aWVfZ06e9CgrHhCaOTMiUjznWqz 83+FML4ET+TAXCWTkqE080smCJ7POmNzAvtjBJ+38yLeuu8E8zTQKOOjtilb3aIJsn5g xXvjkbgUB3rTvM9K3TI69zN4rv5dOzimi0NIx6k3j6dYR6fqenrs9khs3CU7neAsAldd 2PTmjkvwsqy2sLdHIwhul5xpaF9olKKAlT8vnwU1nwsMoVYgBdImZRN9GW65s8jgb3sQ TmEg== X-Gm-Message-State: AOAM533yyyXS3N3jM9aQfDZZfMQNfhflxf33OMdYBf+meRb6LPTQ9AgJ FcGOGQ8jOfQPOq+HLTx8/PuKCQ== X-Received: by 2002:adf:e4c7:: with SMTP id v7mr1482481wrm.245.1614185893752; Wed, 24 Feb 2021 08:58:13 -0800 (PST) Received: from zen.linaroharston ([51.148.130.216]) by smtp.gmail.com with ESMTPSA id q140sm4573017wme.0.2021.02.24.08.58.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 08:58:12 -0800 (PST) Received: from zen.lan (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5C85B1FF7E; Wed, 24 Feb 2021 16:58:11 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: richard.henderson@linaro.org Subject: [RFC PATCH 0/5] Experimenting with tb-lookup tweaks Date: Wed, 24 Feb 2021 16:58:06 +0000 Message-Id: <20210224165811.11567-1-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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: cota@braap.org, =?utf-8?q?Alex_Benn=C3=A9e?= , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" Hi Richard, Well I spun up some of the ideas we talked about to see if there was anything to be squeezed out of the function. In the end the results seem to be a washout with my pigz benchmark: qemu-system-aarch64 -cpu cortex-a57 \ -machine type=virt,virtualization=on,gic-version=3 \ -serial mon:stdio \ -netdev user,id=unet,hostfwd=tcp::2222-:22 \ -device virtio-net-pci,netdev=unet,id=virt-net,disable-legacy=on \ -device virtio-scsi-pci,id=virt-scsi,disable-legacy=on \ -blockdev driver=raw,node-name=hd,discard=unmap,file.driver=host_device,file.filename=/dev/zen-disk/debian-buster-arm64 \ -device scsi-hd,drive=hd,id=virt-scsi-hd \ -smp 4 -m 4096 \ -kernel ~/lsrc/linux.git/builds/arm64/arch/arm64/boot/Image \ -append "root=/dev/sda2 systemd.unit=benchmark-pigz.service" \ -display none -snapshot | Command | Mean [s] | Min [s] | Max [s] | Relative | |---------+----------------+---------+---------+----------| | Before | 46.597 ± 2.482 | 45.208 | 53.618 | 1.00 | | After | 46.867 ± 2.242 | 45.871 | 53.180 | 1.00 | Maybe the code cleanup itself makes it worthwhile. WDYT? Alex Bennée (5): accel/tcg: rename tb_lookup__cpu_state and hoist state extraction accel/tcg: move CF_CLUSTER calculation to curr_cflags accel/tcg: drop the use of CF_HASH_MASK and rename params include/exec: lightly re-arrange TranslationBlock include/exec/tb-lookup: try and reduce branch prediction issues include/exec/exec-all.h | 20 +++++++++++--------- include/exec/tb-lookup.h | 34 +++++++++++++++++----------------- accel/tcg/cpu-exec.c | 31 ++++++++++++++++++------------- accel/tcg/tcg-runtime.c | 6 ++++-- accel/tcg/translate-all.c | 14 ++++++++------ softmmu/physmem.c | 2 +- 6 files changed, 59 insertions(+), 48 deletions(-) -- 2.20.1