diff options
author | Divyesh Shah <dpshah@google.com> | 2010-04-01 18:01:41 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-04-02 02:44:37 -0400 |
commit | 9195291e5f05e01d67f9a09c756b8aca8f009089 (patch) | |
tree | e46a151fe39be2bc23d0683bedb2cbefe916fb5b /block/cfq-iosched.c | |
parent | 303a3acb2362f16c7e7f4c53b40c2f4b396dc8d5 (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.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index c5161bbf2fe9..42028e7128a7 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) | |||
855 | if (!RB_EMPTY_NODE(&cfqg->rb_node)) | 855 | if (!RB_EMPTY_NODE(&cfqg->rb_node)) |
856 | cfq_rb_erase(&cfqg->rb_node, st); | 856 | cfq_rb_erase(&cfqg->rb_node, st); |
857 | cfqg->saved_workload_slice = 0; | 857 | cfqg->saved_workload_slice = 0; |
858 | blkiocg_update_blkio_group_dequeue_stats(&cfqg->blkg, 1); | 858 | blkiocg_update_dequeue_stats(&cfqg->blkg, 1); |
859 | } | 859 | } |
860 | 860 | ||
861 | static inline unsigned int cfq_cfqq_slice_usage(struct cfq_queue *cfqq) | 861 | 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) | |||
1865 | elv_dispatch_sort(q, rq); | 1865 | elv_dispatch_sort(q, rq); |
1866 | 1866 | ||
1867 | cfqd->rq_in_flight[cfq_cfqq_sync(cfqq)]++; | 1867 | cfqd->rq_in_flight[cfq_cfqq_sync(cfqq)]++; |
1868 | blkiocg_update_request_dispatch_stats(&cfqq->cfqg->blkg, rq); | ||
1868 | } | 1869 | } |
1869 | 1870 | ||
1870 | /* | 1871 | /* |
@@ -3285,6 +3286,7 @@ static void cfq_completed_request(struct request_queue *q, struct request *rq) | |||
3285 | WARN_ON(!cfqq->dispatched); | 3286 | WARN_ON(!cfqq->dispatched); |
3286 | cfqd->rq_in_driver--; | 3287 | cfqd->rq_in_driver--; |
3287 | cfqq->dispatched--; | 3288 | cfqq->dispatched--; |
3289 | blkiocg_update_request_completion_stats(&cfqq->cfqg->blkg, rq); | ||
3288 | 3290 | ||
3289 | cfqd->rq_in_flight[cfq_cfqq_sync(cfqq)]--; | 3291 | cfqd->rq_in_flight[cfq_cfqq_sync(cfqq)]--; |
3290 | 3292 | ||