Skip to contentSkip to conversation

cfq: remove 8 bytes of padding from cfq_rb_root on 64 bit builds

PATCH In review Richard Kennedy 2 participants 2 messages Mar 1, 2010 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cfq: remove 8 bytes of padding from cfq_rb_root on 64 bit builds

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.

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

regards
Richard

block/cfq-iosched.c +3 -2
index e3dedfd..daff53d 100644
@@ -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
#1 lore raw
Quoted 5 lines · Richard Kennedy

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.

Signature · 1 line
Jens Axboe