From patchwork Tue Jun 2 12:22:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alberto Garcia X-Patchwork-Id: 479432 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 7900A1412EA for ; Tue, 2 Jun 2015 22:23:39 +1000 (AEST) Received: from localhost ([::1]:58144 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzlEH-000635-KQ for incoming@patchwork.ozlabs.org; Tue, 02 Jun 2015 08:23:37 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzlDP-0004Ss-4f for qemu-devel@nongnu.org; Tue, 02 Jun 2015 08:22:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzlDM-0002ov-Fi for qemu-devel@nongnu.org; Tue, 02 Jun 2015 08:22:43 -0400 Received: from smtp3.mundo-r.com ([212.51.32.191]:46140 helo=smtp4.mundo-r.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzlDM-0002nU-9Q; Tue, 02 Jun 2015 08:22:40 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao0GAH2fbVVbdWOb/2dsb2JhbABbgxCBMqxeAQEBAQEBBQGBBAGYUAKBQUwBAQEBAQGBC4QjAQEEeRBRPBsZiDEB2UUBAQEHIoYZiUtlBxaEFwWeJod8jzwjYYEmH4FUPDGBA4FEAQEB X-IPAS-Result: Ao0GAH2fbVVbdWOb/2dsb2JhbABbgxCBMqxeAQEBAQEBBQGBBAGYUAKBQUwBAQEBAQGBC4QjAQEEeRBRPBsZiDEB2UUBAQEHIoYZiUtlBxaEFwWeJod8jzwjYYEmH4FUPDGBA4FEAQEB X-IronPort-AV: E=Sophos;i="5.13,539,1427752800"; d="scan'208";a="356638983" Received: from fanzine.igalia.com ([91.117.99.155]) by smtp4.mundo-r.com with ESMTP; 02 Jun 2015 14:22:29 +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 1YzlDB-0001G0-1R; Tue, 02 Jun 2015 14:22:29 +0200 Received: from berto by perseus.local with local (Exim 4.85) (envelope-from ) id 1YzlDA-0006EW-OP; Tue, 02 Jun 2015 15:22:28 +0300 From: Alberto Garcia To: qemu-devel@nongnu.org Date: Tue, 2 Jun 2015 14:22:21 +0200 Message-Id: <18678ef28b7e8b94a2a397713b867a28e34718a2.1433247225.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 4/4] 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 c008ed0..1f0c47b 100644 --- a/block/qcow2-cache.c +++ b/block/qcow2-cache.c @@ -37,9 +37,9 @@ typedef struct Qcow2CachedTable { int64_t offset; - bool dirty; uint64_t lru_counter; int ref; + bool dirty; } Qcow2CachedTable; struct Qcow2Cache {