diff options
Diffstat (limited to 'block/cfq-iosched.c')
-rw-r--r-- | block/cfq-iosched.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 85e48192754d..f65c6f01c475 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -148,6 +148,8 @@ struct cfq_queue { | |||
148 | struct cfq_queue *new_cfqq; | 148 | struct cfq_queue *new_cfqq; |
149 | struct cfq_group *cfqg; | 149 | struct cfq_group *cfqg; |
150 | struct cfq_group *orig_cfqg; | 150 | struct cfq_group *orig_cfqg; |
151 | /* Number of sectors dispatched from queue in single dispatch round */ | ||
152 | unsigned long nr_sectors; | ||
151 | }; | 153 | }; |
152 | 154 | ||
153 | /* | 155 | /* |
@@ -960,8 +962,9 @@ static void cfq_group_served(struct cfq_data *cfqd, struct cfq_group *cfqg, | |||
960 | 962 | ||
961 | cfq_log_cfqg(cfqd, cfqg, "served: vt=%llu min_vt=%llu", cfqg->vdisktime, | 963 | cfq_log_cfqg(cfqd, cfqg, "served: vt=%llu min_vt=%llu", cfqg->vdisktime, |
962 | st->min_vdisktime); | 964 | st->min_vdisktime); |
963 | cfq_log_cfqq(cfqq->cfqd, cfqq, "sl_used=%u disp=%u charge=%u iops=%u", | 965 | cfq_log_cfqq(cfqq->cfqd, cfqq, "sl_used=%u disp=%u charge=%u iops=%u" |
964 | used_sl, cfqq->slice_dispatch, charge, iops_mode(cfqd)); | 966 | " sect=%u", used_sl, cfqq->slice_dispatch, charge, |
967 | iops_mode(cfqd), cfqq->nr_sectors); | ||
965 | cfq_blkiocg_update_timeslice_used(&cfqg->blkg, used_sl); | 968 | cfq_blkiocg_update_timeslice_used(&cfqg->blkg, used_sl); |
966 | cfq_blkiocg_set_start_empty_time(&cfqg->blkg); | 969 | cfq_blkiocg_set_start_empty_time(&cfqg->blkg); |
967 | } | 970 | } |
@@ -1609,6 +1612,7 @@ static void __cfq_set_active_queue(struct cfq_data *cfqd, | |||
1609 | cfqq->allocated_slice = 0; | 1612 | cfqq->allocated_slice = 0; |
1610 | cfqq->slice_end = 0; | 1613 | cfqq->slice_end = 0; |
1611 | cfqq->slice_dispatch = 0; | 1614 | cfqq->slice_dispatch = 0; |
1615 | cfqq->nr_sectors = 0; | ||
1612 | 1616 | ||
1613 | cfq_clear_cfqq_wait_request(cfqq); | 1617 | cfq_clear_cfqq_wait_request(cfqq); |
1614 | cfq_clear_cfqq_must_dispatch(cfqq); | 1618 | cfq_clear_cfqq_must_dispatch(cfqq); |
@@ -1971,6 +1975,7 @@ static void cfq_dispatch_insert(struct request_queue *q, struct request *rq) | |||
1971 | elv_dispatch_sort(q, rq); | 1975 | elv_dispatch_sort(q, rq); |
1972 | 1976 | ||
1973 | cfqd->rq_in_flight[cfq_cfqq_sync(cfqq)]++; | 1977 | cfqd->rq_in_flight[cfq_cfqq_sync(cfqq)]++; |
1978 | cfqq->nr_sectors += blk_rq_sectors(rq); | ||
1974 | cfq_blkiocg_update_dispatch_stats(&cfqq->cfqg->blkg, blk_rq_bytes(rq), | 1979 | cfq_blkiocg_update_dispatch_stats(&cfqq->cfqg->blkg, blk_rq_bytes(rq), |
1975 | rq_data_dir(rq), rq_is_sync(rq)); | 1980 | rq_data_dir(rq), rq_is_sync(rq)); |
1976 | } | 1981 | } |