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/blk-cgroup.h | |
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/blk-cgroup.h')
-rw-r--r-- | block/blk-cgroup.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/block/blk-cgroup.h b/block/blk-cgroup.h index 5c5e5294b506..80010ef64ab0 100644 --- a/block/blk-cgroup.h +++ b/block/blk-cgroup.h | |||
@@ -112,12 +112,12 @@ static inline char *blkg_path(struct blkio_group *blkg) | |||
112 | { | 112 | { |
113 | return blkg->path; | 113 | return blkg->path; |
114 | } | 114 | } |
115 | void blkiocg_update_blkio_group_dequeue_stats(struct blkio_group *blkg, | 115 | void blkiocg_update_dequeue_stats(struct blkio_group *blkg, |
116 | unsigned long dequeue); | 116 | unsigned long dequeue); |
117 | #else | 117 | #else |
118 | static inline char *blkg_path(struct blkio_group *blkg) { return NULL; } | 118 | static inline char *blkg_path(struct blkio_group *blkg) { return NULL; } |
119 | static inline void blkiocg_update_blkio_group_dequeue_stats( | 119 | static inline void blkiocg_update_dequeue_stats(struct blkio_group *blkg, |
120 | struct blkio_group *blkg, unsigned long dequeue) {} | 120 | unsigned long dequeue) {} |
121 | #endif | 121 | #endif |
122 | 122 | ||
123 | #if defined(CONFIG_BLK_CGROUP) || defined(CONFIG_BLK_CGROUP_MODULE) | 123 | #if defined(CONFIG_BLK_CGROUP) || defined(CONFIG_BLK_CGROUP_MODULE) |
@@ -130,6 +130,10 @@ extern struct blkio_group *blkiocg_lookup_group(struct blkio_cgroup *blkcg, | |||
130 | void *key); | 130 | void *key); |
131 | void blkiocg_update_timeslice_used(struct blkio_group *blkg, | 131 | void blkiocg_update_timeslice_used(struct blkio_group *blkg, |
132 | unsigned long time); | 132 | unsigned long time); |
133 | void blkiocg_update_request_dispatch_stats(struct blkio_group *blkg, | ||
134 | struct request *rq); | ||
135 | void blkiocg_update_request_completion_stats(struct blkio_group *blkg, | ||
136 | struct request *rq); | ||
133 | #else | 137 | #else |
134 | struct cgroup; | 138 | struct cgroup; |
135 | static inline struct blkio_cgroup * | 139 | static inline struct blkio_cgroup * |
@@ -147,5 +151,9 @@ static inline struct blkio_group * | |||
147 | blkiocg_lookup_group(struct blkio_cgroup *blkcg, void *key) { return NULL; } | 151 | blkiocg_lookup_group(struct blkio_cgroup *blkcg, void *key) { return NULL; } |
148 | static inline void blkiocg_update_timeslice_used(struct blkio_group *blkg, | 152 | static inline void blkiocg_update_timeslice_used(struct blkio_group *blkg, |
149 | unsigned long time) {} | 153 | unsigned long time) {} |
154 | static inline void blkiocg_update_request_dispatch_stats( | ||
155 | struct blkio_group *blkg, struct request *rq) {} | ||
156 | static inline void blkiocg_update_request_completion_stats( | ||
157 | struct blkio_group *blkg, struct request *rq) {} | ||
150 | #endif | 158 | #endif |
151 | #endif /* _BLK_CGROUP_H */ | 159 | #endif /* _BLK_CGROUP_H */ |