* [PATCH] block: reorder request_queue to remove 64 bit alignment padding
@ 2011-07-11 14:19 Richard Kennedy
2011-07-13 9:20 ` Tejun Heo
2011-07-13 19:18 ` Jens Axboe
0 siblings, 2 replies; 3+ messages in thread
From: Richard Kennedy @ 2011-07-11 14:19 UTC (permalink / raw)
To: Jens Axboe; +Cc: Tejun Heo, lkml
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>
----
patch against v3.0-rc6
compiled & tested on x86_64
regards
Richard
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 1a23722..c4649e8 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;
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] block: reorder request_queue to remove 64 bit alignment padding
2011-07-11 14:19 [PATCH] block: reorder request_queue to remove 64 bit alignment padding Richard Kennedy
@ 2011-07-13 9:20 ` Tejun Heo
2011-07-13 19:18 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2011-07-13 9:20 UTC (permalink / raw)
To: Richard Kennedy; +Cc: Jens Axboe, lkml
Hello,
On Mon, Jul 11, 2011 at 4:19 PM, Richard Kennedy
<richard@rsk.demon.co.uk> wrote:
> 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>
Thank you.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] block: reorder request_queue to remove 64 bit alignment padding
2011-07-11 14:19 [PATCH] block: reorder request_queue to remove 64 bit alignment padding Richard Kennedy
2011-07-13 9:20 ` Tejun Heo
@ 2011-07-13 19:18 ` Jens Axboe
1 sibling, 0 replies; 3+ messages in thread
From: Jens Axboe @ 2011-07-13 19:18 UTC (permalink / raw)
To: Richard Kennedy; +Cc: Tejun Heo, lkml
On 2011-07-11 16:19, Richard Kennedy wrote:
> 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.
Thanks, applied.
--
Jens Axboe
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-13 19:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-11 14:19 [PATCH] block: reorder request_queue to remove 64 bit alignment padding Richard Kennedy
2011-07-13 9:20 ` Tejun Heo
2011-07-13 19:18 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox