From patchwork Fri May 29 09:24:55 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alberto Garcia X-Patchwork-Id: 477698 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 8DA7A140E55 for ; Fri, 29 May 2015 19:25:52 +1000 (AEST) Received: from localhost ([::1]:34581 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyGY2-0005pi-60 for incoming@patchwork.ozlabs.org; Fri, 29 May 2015 05:25:50 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59092) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyGXX-00055N-Ot for qemu-devel@nongnu.org; Fri, 29 May 2015 05:25:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyGXS-0000PL-Vu for qemu-devel@nongnu.org; Fri, 29 May 2015 05:25:19 -0400 Received: from smtp3.mundo-r.com ([212.51.32.191]:63517 helo=smtp4.mundo-r.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyGXS-0000Ot-PR; Fri, 29 May 2015 05:25:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhUGAAIwaFVbdWOb/2dsb2JhbABcgxCBMqwOAQEBAQEBBQGBBAGYUwKBR0wBAQEBAQGBC4QjAQEEeRBRPBsZiDEB1AgBAQEHIoYZiUtlBxaEFwWeHId4jzojYYEmH4FUPDGBA4FEAQEB X-IPAS-Result: AhUGAAIwaFVbdWOb/2dsb2JhbABcgxCBMqwOAQEBAQEBBQGBBAGYUwKBR0wBAQEBAQGBC4QjAQEEeRBRPBsZiDEB1AgBAQEHIoYZiUtlBxaEFwWeHId4jzojYYEmH4FUPDGBA4FEAQEB X-IronPort-AV: E=Sophos;i="5.13,516,1427752800"; d="scan'208";a="362752995" Received: from fanzine.igalia.com ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 29 May 2015 11:25:06 +0200 Received: from [192.168.13.244] (helo=perseus.local) by fanzine.igalia.com with esmtpsa (Cipher TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim) id 1YyGXK-0003b7-TU; Fri, 29 May 2015 11:25:06 +0200 Received: from berto by perseus.local with local (Exim 4.85) (envelope-from ) id 1YyGXK-0004wS-Q6; Fri, 29 May 2015 12:25:06 +0300 From: Alberto Garcia To: qemu-devel@nongnu.org Date: Fri, 29 May 2015 11:24:55 +0200 Message-Id: <315e562227b2668a0a376ff9eb9138e3b6689882.1432891306.git.berto@igalia.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 212.51.32.191 Cc: Kevin Wolf , Alberto Garcia , qemu-block@nongnu.org, Max Reitz , Stefan Hajnoczi Subject: [Qemu-devel] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Changing the current ordering saves 8 bytes per cache entry in x86_64. Signed-off-by: Alberto Garcia Reviewed-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf --- block/qcow2-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c index a215f5b..43590ff 100644 --- a/block/qcow2-cache.c +++ b/block/qcow2-cache.c @@ -31,9 +31,9 @@ typedef struct Qcow2CachedTable { int64_t offset; - bool dirty; uint64_t lru_counter; int ref; + bool dirty; } Qcow2CachedTable; struct Qcow2Cache {