Received: from eggs.gnu.org ([2001:4830:134:3::10]:59497) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxHas-00076s-5Q for qemu-devel@nongnu.org; Tue, 26 May 2015 12:20:43 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxHao-0007Ay-4T for qemu-devel@nongnu.org; Tue, 26 May 2015 12:20:41 -0400 From: Alberto Garcia In-Reply-To: <55649AE3.3070404@redhat.com> References: <74e0e0ce58935bf1c285bf484e8f3beb0e3c8f66.1431967209.git.berto@igalia.com> <55649AE3.3070404@redhat.com> Date: Tue, 26 May 2015 18:20:33 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , qemu-devel@nongnu.org Cc: Kevin Wolf , Stefan Hajnoczi , qemu-block@nongnu.org On Tue 26 May 2015 06:10:11 PM CEST, Max Reitz wrote: > On 18.05.2015 18:48, Alberto Garcia wrote: >> Changing the current ordering saves 8 bytes per cache entry in x86_64. > > Hm, not seven? No, the size is 32 before the patch and 24 afterwards. What you save is the 7 bytes of padding after 'dirty' and one of the bytes after 'ref'. >> typedef struct Qcow2CachedTable { >> int64_t offset; >> - bool dirty; >> uint64_t lru_counter; >> int ref; >> + bool dirty; >> } Qcow2CachedTable; Berto