aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndi Kleen <ak@linux.intel.com>2012-01-12 20:20:34 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-12 23:13:12 -0500
commit87192a2a49c475cf322cb143e0fa63b0102d8567 (patch)
tree70acf2fb1e4a9a3a62559ad9218278d2fb114599 /include
parentae55e1aaa7e2e57e538cb98cf617f511c5dc4f73 (diff)
vfs: cache request_queue in struct block_device
This makes it possible to get from the inode to the request_queue with one less cache miss. Used in followon optimization. The livetime of the pointer is the same as the gendisk. This assumes that the queue will always stay the same in the gendisk while it's visible to block_devices. I think that's safe correct? Signed-off-by: Andi Kleen <ak@linux.intel.com> Acked-by: Jeff Moyer <jmoyer@redhat.com> Cc: Jens Axboe <axboe@kernel.dk> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e694bd4434a4..4bc8169fb5a1 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -660,6 +660,7 @@ struct address_space {
660 * must be enforced here for CRIS, to let the least significant bit 660 * must be enforced here for CRIS, to let the least significant bit
661 * of struct page's "mapping" pointer be used for PAGE_MAPPING_ANON. 661 * of struct page's "mapping" pointer be used for PAGE_MAPPING_ANON.
662 */ 662 */
663struct request_queue;
663 664
664struct block_device { 665struct block_device {
665 dev_t bd_dev; /* not a kdev_t - it's a search key */ 666 dev_t bd_dev; /* not a kdev_t - it's a search key */
@@ -682,6 +683,7 @@ struct block_device {
682 unsigned bd_part_count; 683 unsigned bd_part_count;
683 int bd_invalidated; 684 int bd_invalidated;
684 struct gendisk * bd_disk; 685 struct gendisk * bd_disk;
686 struct request_queue * bd_queue;
685 struct list_head bd_list; 687 struct list_head bd_list;
686 /* 688 /*
687 * Private data. You must have bd_claim'ed the block_device 689 * Private data. You must have bd_claim'ed the block_device