summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Kennedy <richard@rsk.demon.co.uk>2011-07-13 21:17:23 +0200
committerJens Axboe <jaxboe@fusionio.com>2011-07-13 21:17:49 +0200
commitd7b7630130e52361af66ce3b994696e2357ba7de (patch)
tree52e76c86cd35ffb1e7656f391f4b730072a6193c
parent7700fc4f675fa38094e78e345b594363a2fd895b (diff)
block: reorder request_queue to remove 64 bit alignment padding
Reorder request_queue to remove 16 bytes of alignment padding in 64 bit builds. On my config this shrinks the size of this structure from 1608 to 1592 bytes and therefore needs one fewer cachelines. Also trivially move the open bracket { to be on the same line as the structure name to make it easier to grep. Signed-off-by: Richard Kennedy <richard@rsk.demon.co.uk> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
-rw-r--r--include/linux/blkdev.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 6dcea6885a5..c0cd9a2f22e 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -260,8 +260,7 @@ struct queue_limits {
unsigned char discard_zeroes_data;
};
-struct request_queue
-{
+struct request_queue {
/*
* Together with queue_head for cacheline sharing
*/
@@ -304,14 +303,14 @@ struct request_queue
void *queuedata;
/*
- * queue needs bounce pages for pages above this limit
+ * various queue flags, see QUEUE_* below
*/
- gfp_t bounce_gfp;
+ unsigned long queue_flags;
/*
- * various queue flags, see QUEUE_* below
+ * queue needs bounce pages for pages above this limit
*/
- unsigned long queue_flags;
+ gfp_t bounce_gfp;
/*
* protects queue structures from reentrancy. ->__queue_lock should
@@ -334,8 +333,8 @@ struct request_queue
unsigned int nr_congestion_off;
unsigned int nr_batching;
- void *dma_drain_buffer;
unsigned int dma_drain_size;
+ void *dma_drain_buffer;
unsigned int dma_pad_mask;
unsigned int dma_alignment;