[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable t

From: Max Reitz
Subject: Re: [Qemu-devel] [PATCH 3/3] qcow2: reorder fields in Qcow2CachedTable to reduce padding
Date: Tue, 26 May 2015 18:10:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

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?

Signed-off-by: Alberto Garcia <address@hidden>
  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 {

With "7" above, or an explanation why it actually is 8:

Reviewed-by: Max Reitz <address@hidden>

reply via email to

[Prev in Thread] Current Thread [Next in Thread]