All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Reorganize struct Qcow2Cache for better struct packing
@ 2011-01-27 10:25 Jes.Sorensen
  2011-01-27 11:35 ` [Qemu-devel] " Kevin Wolf
  0 siblings, 1 reply; 2+ messages in thread
From: Jes.Sorensen @ 2011-01-27 10:25 UTC (permalink / raw)
  To: kwolf; +Cc: qemu-devel

From: Jes Sorensen <Jes.Sorensen@redhat.com>

Move size after the two pointers in struct Qcow2Cache to get better
packing of struct elements on 64 bit architectures.

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
 block/qcow2-cache.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c
index 8f2955b..3824739 100644
--- a/block/qcow2-cache.c
+++ b/block/qcow2-cache.c
@@ -35,9 +35,9 @@ typedef struct Qcow2CachedTable {
 } Qcow2CachedTable;
 
 struct Qcow2Cache {
-    int                     size;
     Qcow2CachedTable*       entries;
     struct Qcow2Cache*      depends;
+    int                     size;
     bool                    depends_on_flush;
     bool                    writethrough;
 };
-- 
1.7.3.5

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Qemu-devel] Re: [PATCH] Reorganize struct Qcow2Cache for better struct packing
  2011-01-27 10:25 [Qemu-devel] [PATCH] Reorganize struct Qcow2Cache for better struct packing Jes.Sorensen
@ 2011-01-27 11:35 ` Kevin Wolf
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Wolf @ 2011-01-27 11:35 UTC (permalink / raw)
  To: Jes.Sorensen; +Cc: qemu-devel

Am 27.01.2011 11:25, schrieb Jes.Sorensen@redhat.com:
> From: Jes Sorensen <Jes.Sorensen@redhat.com>
> 
> Move size after the two pointers in struct Qcow2Cache to get better
> packing of struct elements on 64 bit architectures.
> 
> Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>

Thanks, applied to the block branch.

Kevin

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-27 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-27 10:25 [Qemu-devel] [PATCH] Reorganize struct Qcow2Cache for better struct packing Jes.Sorensen
2011-01-27 11:35 ` [Qemu-devel] " Kevin Wolf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.