summaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorDivyesh Shah <dpshah@google.com>2010-04-01 15:01:41 -0700
committerJens Axboe <jens.axboe@oracle.com>2010-04-02 08:44:37 +0200
commit9195291e5f05e01d67f9a09c756b8aca8f009089 (patch)
treee46a151fe39be2bc23d0683bedb2cbefe916fb5b /block/cfq-iosched.c
parent303a3acb2362f16c7e7f4c53b40c2f4b396dc8d5 (diff)
blkio: Increment the blkio cgroup stats for real now
We also add start_time_ns and io_start_time_ns fields to struct request here to record the time when a request is created and when it is dispatched to device. We use ns uints here as ms and jiffies are not very useful for non-rotational media. Signed-off-by: Divyesh Shah<dpshah@google.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r--block/cfq-iosched.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index c5161bbf2fe..42028e7128a 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -855,7 +855,7 @@ cfq_group_service_tree_del(struct cfq_data *cfqd, struct cfq_group *cfqg)
if (!RB_EMPTY_NODE(&cfqg->rb_node))
cfq_rb_erase(&cfqg->rb_node, st);
cfqg->saved_workload_slice = 0;
- blkiocg_update_blkio_group_dequeue_stats(&cfqg->blkg, 1);
+ blkiocg_update_dequeue_stats(&cfqg->blkg, 1);
}
static inline unsigned int cfq_cfqq_slice_usage(struct cfq_queue *cfqq)
@@ -1865,6 +1865,7 @@ static void cfq_dispatch_insert(struct request_queue *q, struct request *rq)
elv_dispatch_sort(q, rq);
cfqd->rq_in_flight[cfq_cfqq_sync(cfqq)]++;
+ blkiocg_update_request_dispatch_stats(&cfqq->cfqg->blkg, rq);
}
/*
@@ -3285,6 +3286,7 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq)
WARN_ON(!cfqq->dispatched);
cfqd->rq_in_driver--;
cfqq->dispatched--;
+ blkiocg_update_request_completion_stats(&cfqq->cfqg->blkg, rq);
cfqd->rq_in_flight[cfq_cfqq_sync(cfqq)]--;