diff options
author | Tejun Heo <tj@kernel.org> | 2012-04-01 17:38:44 -0400 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-04-01 17:38:44 -0400 |
commit | 155fead9b6347ead90e0b0396cb108a6ba6126c6 (patch) | |
tree | 7e14bb87d942561aa5f44ac8a2d09d6e546c6ccb /block/blk-cgroup.h | |
parent | 9ade5ea4ce57d3596eaee6a57cd212a483674058 (diff) |
blkcg: move blkio_group_stats to cfq-iosched.c
blkio_group_stats contains only fields used by cfq and has no reason
to be defined in blkcg core.
* Move blkio_group_stats to cfq-iosched.c and rename it to cfqg_stats.
* blkg_policy_data->stats is replaced with cfq_group->stats.
blkg_prfill_[rw]stat() are updated to use offset against pd->pdata
instead.
* All related macros / functions are renamed so that they have cfqg_
prefix and the unnecessary @pol arguments are dropped.
* All stat functions now take cfq_group * instead of blkio_group *.
* lockdep assertion on queue lock dropped. Elevator runs under queue
lock by default. There isn't much to be gained by adding lockdep
assertions at stat function level.
* cfqg_stats_reset() implemented for blkio_reset_group_stats_fn method
so that cfqg->stats can be reset.
Signed-off-by: Tejun Heo <tj@kernel.org>
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index d0ee649e8bbb..791570394e87 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h | |||
@@ -64,46 +64,6 @@ struct blkg_rwstat { | |||
64 | uint64_t cnt[BLKG_RWSTAT_NR]; | 64 | uint64_t cnt[BLKG_RWSTAT_NR]; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | struct blkio_group_stats { | ||
68 | /* total bytes transferred */ | ||
69 | struct blkg_rwstat service_bytes; | ||
70 | /* total IOs serviced, post merge */ | ||
71 | struct blkg_rwstat serviced; | ||
72 | /* number of ios merged */ | ||
73 | struct blkg_rwstat merged; | ||
74 | /* total time spent on device in ns, may not be accurate w/ queueing */ | ||
75 | struct blkg_rwstat service_time; | ||
76 | /* total time spent waiting in scheduler queue in ns */ | ||
77 | struct blkg_rwstat wait_time; | ||
78 | /* number of IOs queued up */ | ||
79 | struct blkg_rwstat queued; | ||
80 | /* total sectors transferred */ | ||
81 | struct blkg_stat sectors; | ||
82 | /* total disk time and nr sectors dispatched by this group */ | ||
83 | struct blkg_stat time; | ||
84 | #ifdef CONFIG_DEBUG_BLK_CGROUP | ||
85 | /* time not charged to this cgroup */ | ||
86 | struct blkg_stat unaccounted_time; | ||
87 | /* sum of number of ios queued across all samples */ | ||
88 | struct blkg_stat avg_queue_size_sum; | ||
89 | /* count of samples taken for average */ | ||
90 | struct blkg_stat avg_queue_size_samples; | ||
91 | /* how many times this group has been removed from service tree */ | ||
92 | struct blkg_stat dequeue; | ||
93 | /* total time spent waiting for it to be assigned a timeslice. */ | ||
94 | struct blkg_stat group_wait_time; | ||
95 | /* time spent idling for this blkio_group */ | ||
96 | struct blkg_stat idle_time; | ||
97 | /* total time with empty current active q with other requests queued */ | ||
98 | struct blkg_stat empty_time; | ||
99 | /* fields after this shouldn't be cleared on stat reset */ | ||
100 | uint64_t start_group_wait_time; | ||
101 | uint64_t start_idle_time; | ||
102 | uint64_t start_empty_time; | ||
103 | uint16_t flags; | ||
104 | #endif | ||
105 | }; | ||
106 | |||
107 | /* Per cpu blkio group stats */ | 67 | /* Per cpu blkio group stats */ |
108 | struct blkio_group_stats_cpu { | 68 | struct blkio_group_stats_cpu { |
109 | /* total bytes transferred */ | 69 | /* total bytes transferred */ |
@@ -126,7 +86,6 @@ struct blkg_policy_data { | |||
126 | /* Configuration */ | 86 | /* Configuration */ |
127 | struct blkio_group_conf conf; | 87 | struct blkio_group_conf conf; |
128 | 88 | ||
129 | struct blkio_group_stats stats; | ||
130 | /* Per cpu stats pointer */ | 89 | /* Per cpu stats pointer */ |
131 | struct blkio_group_stats_cpu __percpu *stats_cpu; | 90 | struct blkio_group_stats_cpu __percpu *stats_cpu; |
132 | 91 | ||