diff options
author | Divyesh Shah <dpshah@google.com> | 2010-04-01 18:01:04 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-04-02 02:44:36 -0400 |
commit | 9a0785b0da561e1e9c6617df85e93ae107a42f18 (patch) | |
tree | 56cb6b65f175a13c85976192216a6b8101b0d0f3 /block | |
parent | ed6b6dc7c142bfb5840d201a9b4a465c9e56ce33 (diff) |
blkio: Remove per-cfqq nr_sectors as we'll be passing
that info at request dispatch with other stats now. This patch removes the
existing support for accounting sectors for a blkio_group. This will be added
back differently in the next two patches.
Signed-off-by: Divyesh Shah<dpshah@google.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-cgroup.c | 3 | ||||
-rw-r--r-- | block/blk-cgroup.h | 6 | ||||
-rw-r--r-- | block/cfq-iosched.c | 10 |
3 files changed, 5 insertions, 14 deletions
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c index 4b686ad08eaa..5be39813fc9b 100644 --- a/block/blk-cgroup.c +++ b/block/blk-cgroup.c | |||
@@ -56,10 +56,9 @@ struct blkio_cgroup *cgroup_to_blkio_cgroup(struct cgroup *cgroup) | |||
56 | EXPORT_SYMBOL_GPL(cgroup_to_blkio_cgroup); | 56 | EXPORT_SYMBOL_GPL(cgroup_to_blkio_cgroup); |
57 | 57 | ||
58 | void blkiocg_update_blkio_group_stats(struct blkio_group *blkg, | 58 | void blkiocg_update_blkio_group_stats(struct blkio_group *blkg, |
59 | unsigned long time, unsigned long sectors) | 59 | unsigned long time) |
60 | { | 60 | { |
61 | blkg->time += time; | 61 | blkg->time += time; |
62 | blkg->sectors += sectors; | ||
63 | } | 62 | } |
64 | EXPORT_SYMBOL_GPL(blkiocg_update_blkio_group_stats); | 63 | EXPORT_SYMBOL_GPL(blkiocg_update_blkio_group_stats); |
65 | 64 | ||
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 8ccc20464dae..fe445178f586 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h | |||
@@ -106,7 +106,7 @@ extern int blkiocg_del_blkio_group(struct blkio_group *blkg); | |||
106 | extern struct blkio_group *blkiocg_lookup_group(struct blkio_cgroup *blkcg, | 106 | extern struct blkio_group *blkiocg_lookup_group(struct blkio_cgroup *blkcg, |
107 | void *key); | 107 | void *key); |
108 | void blkiocg_update_blkio_group_stats(struct blkio_group *blkg, | 108 | void blkiocg_update_blkio_group_stats(struct blkio_group *blkg, |
109 | unsigned long time, unsigned long sectors); | 109 | unsigned long time); |
110 | #else | 110 | #else |
111 | struct cgroup; | 111 | struct cgroup; |
112 | static inline struct blkio_cgroup * | 112 | static inline struct blkio_cgroup * |
@@ -123,8 +123,6 @@ blkiocg_del_blkio_group(struct blkio_group *blkg) { return 0; } | |||
123 | static inline struct blkio_group * | 123 | static inline struct blkio_group * |
124 | blkiocg_lookup_group(struct blkio_cgroup *blkcg, void *key) { return NULL; } | 124 | blkiocg_lookup_group(struct blkio_cgroup *blkcg, void *key) { return NULL; } |
125 | static inline void blkiocg_update_blkio_group_stats(struct blkio_group *blkg, | 125 | static inline void blkiocg_update_blkio_group_stats(struct blkio_group *blkg, |
126 | unsigned long time, unsigned long sectors) | 126 | unsigned long time) {} |
127 | { | ||
128 | } | ||
129 | #endif | 127 | #endif |
130 | #endif /* _BLK_CGROUP_H */ | 128 | #endif /* _BLK_CGROUP_H */ |
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c index 2c7a0f4f3cd7..7471d36bce89 100644 --- a/block/cfq-iosched.c +++ b/block/cfq-iosched.c | |||
@@ -142,8 +142,6 @@ struct cfq_queue { | |||
142 | struct cfq_queue *new_cfqq; | 142 | struct cfq_queue *new_cfqq; |
143 | struct cfq_group *cfqg; | 143 | struct cfq_group *cfqg; |
144 | struct cfq_group *orig_cfqg; | 144 | struct cfq_group *orig_cfqg; |
145 | /* Sectors dispatched in current dispatch round */ | ||
146 | unsigned long nr_sectors; | ||
147 | }; | 145 | }; |
148 | 146 | ||
149 | /* | 147 | /* |
@@ -883,8 +881,7 @@ static inline unsigned int cfq_cfqq_slice_usage(struct cfq_queue *cfqq) | |||
883 | slice_used = cfqq->allocated_slice; | 881 | slice_used = cfqq->allocated_slice; |
884 | } | 882 | } |
885 | 883 | ||
886 | cfq_log_cfqq(cfqq->cfqd, cfqq, "sl_used=%u sect=%lu", slice_used, | 884 | cfq_log_cfqq(cfqq->cfqd, cfqq, "sl_used=%u", slice_used); |
887 | cfqq->nr_sectors); | ||
888 | return slice_used; | 885 | return slice_used; |
889 | } | 886 | } |
890 | 887 | ||
@@ -918,8 +915,7 @@ static void cfq_group_served(struct cfq_data *cfqd, struct cfq_group *cfqg, | |||
918 | 915 | ||
919 | cfq_log_cfqg(cfqd, cfqg, "served: vt=%llu min_vt=%llu", cfqg->vdisktime, | 916 | cfq_log_cfqg(cfqd, cfqg, "served: vt=%llu min_vt=%llu", cfqg->vdisktime, |
920 | st->min_vdisktime); | 917 | st->min_vdisktime); |
921 | blkiocg_update_blkio_group_stats(&cfqg->blkg, used_sl, | 918 | blkiocg_update_blkio_group_stats(&cfqg->blkg, used_sl); |
922 | cfqq->nr_sectors); | ||
923 | } | 919 | } |
924 | 920 | ||
925 | #ifdef CONFIG_CFQ_GROUP_IOSCHED | 921 | #ifdef CONFIG_CFQ_GROUP_IOSCHED |
@@ -1525,7 +1521,6 @@ static void __cfq_set_active_queue(struct cfq_data *cfqd, | |||
1525 | cfqq->allocated_slice = 0; | 1521 | cfqq->allocated_slice = 0; |
1526 | cfqq->slice_end = 0; | 1522 | cfqq->slice_end = 0; |
1527 | cfqq->slice_dispatch = 0; | 1523 | cfqq->slice_dispatch = 0; |
1528 | cfqq->nr_sectors = 0; | ||
1529 | 1524 | ||
1530 | cfq_clear_cfqq_wait_request(cfqq); | 1525 | cfq_clear_cfqq_wait_request(cfqq); |
1531 | cfq_clear_cfqq_must_dispatch(cfqq); | 1526 | cfq_clear_cfqq_must_dispatch(cfqq); |
@@ -1870,7 +1865,6 @@ static void cfq_dispatch_insert(struct request_queue *q, struct request *rq) | |||
1870 | elv_dispatch_sort(q, rq); | 1865 | elv_dispatch_sort(q, rq); |
1871 | 1866 | ||
1872 | cfqd->rq_in_flight[cfq_cfqq_sync(cfqq)]++; | 1867 | cfqd->rq_in_flight[cfq_cfqq_sync(cfqq)]++; |
1873 | cfqq->nr_sectors += blk_rq_sectors(rq); | ||
1874 | } | 1868 | } |
1875 | 1869 | ||
1876 | /* | 1870 | /* |