public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cfq: remove 8 bytes of padding from cfq_rb_root on 64 bit builds
@ 2010-03-01  9:46 Richard Kennedy
  2010-03-01  9:49 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Richard Kennedy @ 2010-03-01  9:46 UTC (permalink / raw)
  To: Jens Axboe; +Cc: lkml

Reorder cfq_rb_root to remove 8 bytes of padding on 64 bit builds.
    

Consequently removing 56 bytes from cfq_group and 64 bytes from
cfq_data.
    
    
Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk>

---
patch against 2.6.33
compiled & tested on x86_64 AMD-X2

regards
Richard

diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index e3dedfd..daff53d 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -77,11 +77,12 @@ struct cfq_rb_root {
 	struct rb_root rb;
 	struct rb_node *left;
 	unsigned count;
+	unsigned total_weight;
 	u64 min_vdisktime;
 	struct rb_node *active;
-	unsigned total_weight;
 };
-#define CFQ_RB_ROOT	(struct cfq_rb_root) { RB_ROOT, NULL, 0, 0, }
+#define CFQ_RB_ROOT	(struct cfq_rb_root) { .rb = RB_ROOT, .left = NULL, \
+			.count = 0, .min_vdisktime = 0, }
 
 /*
  * Per process-grouping structure



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

* Re: [PATCH] cfq: remove 8 bytes of padding from cfq_rb_root on 64 bit  builds
  2010-03-01  9:46 [PATCH] cfq: remove 8 bytes of padding from cfq_rb_root on 64 bit builds Richard Kennedy
@ 2010-03-01  9:49 ` Jens Axboe
  0 siblings, 0 replies; 2+ messages in thread
From: Jens Axboe @ 2010-03-01  9:49 UTC (permalink / raw)
  To: Richard Kennedy; +Cc: lkml

On Mon, Mar 01 2010, Richard Kennedy wrote:
> Reorder cfq_rb_root to remove 8 bytes of padding on 64 bit builds.
>     
> 
> Consequently removing 56 bytes from cfq_group and 64 bytes from
> cfq_data.

Thanks Richard, applied.

-- 
Jens Axboe


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

end of thread, other threads:[~2010-03-01  9:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-01  9:46 [PATCH] cfq: remove 8 bytes of padding from cfq_rb_root on 64 bit builds Richard Kennedy
2010-03-01  9:49 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox