aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-cgroup.h
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-cgroup.h')
-rw-r--r--block/blk-cgroup.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h
index b22e55390a4f..470a29db6bec 100644
--- a/block/blk-cgroup.h
+++ b/block/blk-cgroup.h
@@ -34,6 +34,8 @@ enum stat_type {
34 BLKIO_STAT_SERVICED, 34 BLKIO_STAT_SERVICED,
35 /* Total time spent waiting in scheduler queue in ns */ 35 /* Total time spent waiting in scheduler queue in ns */
36 BLKIO_STAT_WAIT_TIME, 36 BLKIO_STAT_WAIT_TIME,
37 /* Number of IOs merged */
38 BLKIO_STAT_MERGED,
37 /* All the single valued stats go below this */ 39 /* All the single valued stats go below this */
38 BLKIO_STAT_TIME, 40 BLKIO_STAT_TIME,
39 BLKIO_STAT_SECTORS, 41 BLKIO_STAT_SECTORS,
@@ -61,7 +63,7 @@ struct blkio_group_stats {
61 /* total disk time and nr sectors dispatched by this group */ 63 /* total disk time and nr sectors dispatched by this group */
62 uint64_t time; 64 uint64_t time;
63 uint64_t sectors; 65 uint64_t sectors;
64 uint64_t stat_arr[BLKIO_STAT_WAIT_TIME + 1][BLKIO_STAT_TOTAL]; 66 uint64_t stat_arr[BLKIO_STAT_MERGED + 1][BLKIO_STAT_TOTAL];
65#ifdef CONFIG_DEBUG_BLK_CGROUP 67#ifdef CONFIG_DEBUG_BLK_CGROUP
66 /* How many times this group has been removed from service tree */ 68 /* How many times this group has been removed from service tree */
67 unsigned long dequeue; 69 unsigned long dequeue;
@@ -148,6 +150,8 @@ void blkiocg_update_dispatch_stats(struct blkio_group *blkg, uint64_t bytes,
148 bool direction, bool sync); 150 bool direction, bool sync);
149void blkiocg_update_completion_stats(struct blkio_group *blkg, 151void blkiocg_update_completion_stats(struct blkio_group *blkg,
150 uint64_t start_time, uint64_t io_start_time, bool direction, bool sync); 152 uint64_t start_time, uint64_t io_start_time, bool direction, bool sync);
153void blkiocg_update_io_merged_stats(struct blkio_group *blkg, bool direction,
154 bool sync);
151#else 155#else
152struct cgroup; 156struct cgroup;
153static inline struct blkio_cgroup * 157static inline struct blkio_cgroup *
@@ -169,5 +173,7 @@ static inline void blkiocg_update_dispatch_stats(struct blkio_group *blkg,
169static inline void blkiocg_update_completion_stats(struct blkio_group *blkg, 173static inline void blkiocg_update_completion_stats(struct blkio_group *blkg,
170 uint64_t start_time, uint64_t io_start_time, bool direction, 174 uint64_t start_time, uint64_t io_start_time, bool direction,
171 bool sync) {} 175 bool sync) {}
176static inline void blkiocg_update_io_merged_stats(struct blkio_group *blkg,
177 bool direction, bool sync) {}
172#endif 178#endif
173#endif /* _BLK_CGROUP_H */ 179#endif /* _BLK_CGROUP_H */