From nobody Wed Nov 5 09:24:04 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1499587341788537.097050017437; Sun, 9 Jul 2017 01:02:21 -0700 (PDT) Received: from localhost ([::1]:35305 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dU7AZ-0005Pm-MQ for importer@patchew.org; Sun, 09 Jul 2017 04:02:19 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dU6zK-0004RB-H0 for qemu-devel@nongnu.org; Sun, 09 Jul 2017 03:50:44 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dU6zE-00030g-Nm for qemu-devel@nongnu.org; Sun, 09 Jul 2017 03:50:42 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:42939) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dU6zE-0002zM-AB for qemu-devel@nongnu.org; Sun, 09 Jul 2017 03:50:36 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 68420208C3; Sun, 9 Jul 2017 03:50:33 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute4.internal (MEProxy); Sun, 09 Jul 2017 03:50:33 -0400 Received: from localhost (flamenco.cs.columbia.edu [128.59.20.216]) by mail.messagingengine.com (Postfix) with ESMTPA id 29CEC24254; Sun, 9 Jul 2017 03:50:33 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=braap.org; h=cc :date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=PDL Hlx/SpR/9nOEFa5iCy6ycPGXf+9bh3Zm9B+3XW1g=; b=fBle4ghPQyDon32emlw 0d/hlQOaq1TYghH8U4QZ3sc+Ens9A+pr+dVts3MqvqclbCRckGlzGjZJnTITNn0N Vk3MNiScIwv2pM8CuNpvA2ti0+dqFmQ+nMINO8yHkAGMMyjBf5WIWIZ+qLGhMLgM XGgscw9pjOPlk438I5bSSPnU= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=fm1; bh=PDLHlx/SpR/9nOEFa5iCy6ycPGXf+9bh3Zm9B+3XW 1g=; b=RG3shl5umekNRG1CjHJYUaOKm5DTxmXcwqw2bgSM4evg+gXRxBAet576m aGwf4IttREVBFyaPrICCXwQWPqLh63LR6H0aq6btjvrDyvBPigSCZr5Y9blx6Azr Qj8SaFXaNAph7i6pL8zQlu5h7xO5IUAoPTFLiDWR7Nf2sPj7rrsha8bUTI4wXYQ9 s78mGM+Nk5TYKHy4//WP3E2aMldw4yeNPfewH7xpEmx93F6wk7PE7g+685txKcow 72DHPmFYOen7zTd3tvw28FHZDheO+ydZMnEv+F3mNJ/V+ZaBvO/Cq+YuThJ/bWRh iO8DNnTG+PB7khPOek8ne041ugFyQ== X-ME-Sender: X-Sasl-enc: UBHVtUCZZyWfR1q4ACHvQ84DZxJZjLIOl1qu6FTY3Tj0 1499586633 From: "Emilio G. Cota" To: qemu-devel@nongnu.org Date: Sun, 9 Jul 2017 03:50:02 -0400 Message-Id: <1499586614-20507-11-git-send-email-cota@braap.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1499586614-20507-1-git-send-email-cota@braap.org> References: <1499586614-20507-1-git-send-email-cota@braap.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.27 Subject: [Qemu-devel] [PATCH 10/22] exec-all: move tb->invalid to the end of the struct X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This opens up a 4-byte hole to be used by upcoming work. Note that moving this field to the 2nd cache line of the struct does not affect performance: tb->page_addr is in the 2nd cache line as well, and both are accessed during code lookup. Besides, the tb->invalid check is easily predicted. Signed-off-by: Emilio G. Cota --- include/exec/exec-all.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index a388756..fd20bca 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -327,8 +327,6 @@ struct TranslationBlock { #define CF_USE_ICOUNT 0x20000 #define CF_IGNORE_ICOUNT 0x40000 /* Do not generate icount code */ =20 - uint8_t invalid; - void *tc_ptr; /* pointer to the translated code */ uint8_t *tc_search; /* pointer to search data */ /* original tb when cflags has CF_NOCACHE */ @@ -366,6 +364,7 @@ struct TranslationBlock { */ uintptr_t jmp_list_next[2]; uintptr_t jmp_list_first; + uint8_t invalid; }; =20 void tb_free(TranslationBlock *tb); --=20 2.7.4