diff options
| author | Tejun Heo <tj@kernel.org> | 2012-06-04 23:40:58 -0400 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2012-06-25 05:53:51 -0400 |
| commit | 8a5ecdd42862bf87ceab00bf2a15d7eabf58c02d (patch) | |
| tree | 36ff209f0655c5da9cfb7c5c6f6e9b9786841201 /include | |
| parent | b1208b56f31408f7d8381ff5d08e970aa5ee761c (diff) | |
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>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/blkdev.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 07954b05b86c..7e44ed93f84b 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
| @@ -51,11 +51,10 @@ struct request_list { | |||
| 51 | * count[], starved[], and wait[] are indexed by | 51 | * count[], starved[], and wait[] are indexed by |
| 52 | * BLK_RW_SYNC/BLK_RW_ASYNC | 52 | * BLK_RW_SYNC/BLK_RW_ASYNC |
| 53 | */ | 53 | */ |
| 54 | int count[2]; | 54 | int count[2]; |
| 55 | int starved[2]; | 55 | int starved[2]; |
| 56 | int elvpriv; | 56 | mempool_t *rq_pool; |
| 57 | mempool_t *rq_pool; | 57 | wait_queue_head_t wait[2]; |
| 58 | wait_queue_head_t wait[2]; | ||
| 59 | }; | 58 | }; |
| 60 | 59 | ||
| 61 | /* | 60 | /* |
| @@ -282,6 +281,8 @@ struct request_queue { | |||
| 282 | struct list_head queue_head; | 281 | struct list_head queue_head; |
| 283 | struct request *last_merge; | 282 | struct request *last_merge; |
| 284 | struct elevator_queue *elevator; | 283 | struct elevator_queue *elevator; |
| 284 | int nr_rqs[2]; /* # allocated [a]sync rqs */ | ||
| 285 | int nr_rqs_elvpriv; /* # allocated rqs w/ elvpriv */ | ||
| 285 | 286 | ||
| 286 | /* | 287 | /* |
| 287 | * the queue request freelist, one for reads and one for writes | 288 | * the queue request freelist, one for reads and one for writes |
