Commit 0549e87c authored by Ming Lei's avatar Ming Lei Committed by Jens Axboe

block: move 'q_usage_counter' into front of 'request_queue'

The field of 'q_usage_counter' is always fetched in fast path of every
block driver, and move it into front of 'request_queue', so it can be
fetched into 1st cacheline of 'request_queue' instance.
Signed-off-by: default avatarMing Lei <ming.lei@redhat.com>
Tested-by: default avatarVeronika Kabatova <vkabatov@redhat.com>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: Sagi Grimberg <sagi@grimberg.me>
Cc: Tejun Heo <tj@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 2b0d3d3e
...@@ -397,6 +397,8 @@ struct request_queue { ...@@ -397,6 +397,8 @@ struct request_queue {
struct request *last_merge; struct request *last_merge;
struct elevator_queue *elevator; struct elevator_queue *elevator;
struct percpu_ref q_usage_counter;
struct blk_queue_stats *stats; struct blk_queue_stats *stats;
struct rq_qos *rq_qos; struct rq_qos *rq_qos;
...@@ -569,7 +571,6 @@ struct request_queue { ...@@ -569,7 +571,6 @@ struct request_queue {
* percpu_ref_kill() and percpu_ref_reinit(). * percpu_ref_kill() and percpu_ref_reinit().
*/ */
struct mutex mq_freeze_lock; struct mutex mq_freeze_lock;
struct percpu_ref q_usage_counter;
struct blk_mq_tag_set *tag_set; struct blk_mq_tag_set *tag_set;
struct list_head tag_set_list; struct list_head tag_set_list;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment