block: add q->nr_rqs[] and move q->rq.elvpriv to q->nr_rqs_elvpriv
Add q->nr_rqs[] which currently behaves the same as q->rq.count[] and move q->rq.elvpriv to q->nr_rqs_elvpriv. blk_drain_queue() is updated to use q->nr_rqs[] instead of q->rq.count[]. These counters separates queue-wide request statistics from the request list and allow implementation of per-queue request allocation. While at it, properly indent fields of struct request_list. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
b1208b56f3
commit
8a5ecdd428
2 changed files with 13 additions and 11 deletions
|
|
@ -51,11 +51,10 @@ struct request_list {
|
|||
* count[], starved[], and wait[] are indexed by
|
||||
* BLK_RW_SYNC/BLK_RW_ASYNC
|
||||
*/
|
||||
int count[2];
|
||||
int starved[2];
|
||||
int elvpriv;
|
||||
mempool_t *rq_pool;
|
||||
wait_queue_head_t wait[2];
|
||||
int count[2];
|
||||
int starved[2];
|
||||
mempool_t *rq_pool;
|
||||
wait_queue_head_t wait[2];
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -282,6 +281,8 @@ struct request_queue {
|
|||
struct list_head queue_head;
|
||||
struct request *last_merge;
|
||||
struct elevator_queue *elevator;
|
||||
int nr_rqs[2]; /* # allocated [a]sync rqs */
|
||||
int nr_rqs_elvpriv; /* # allocated rqs w/ elvpriv */
|
||||
|
||||
/*
|
||||
* the queue request freelist, one for reads and one for writes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue