diff options
author | Divyesh Shah <dpshah@google.com> | 2010-04-09 02:31:19 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2010-04-09 02:31:19 -0400 |
commit | 84c124da9ff50bd71fab9c939ee5b7cd8bef2bd9 (patch) | |
tree | f94ad03b56c71ebbe6b92265054c5e24af25b869 /include/linux/blkdev.h | |
parent | 31373d09da5b7fe21fe6f781e92bd534a3495f00 (diff) |
blkio: Changes to IO controller additional stats patches
that include some minor fixes and addresses all comments.
Changelog: (most based on Vivek Goyal's comments)
o renamed blkiocg_reset_write to blkiocg_reset_stats
o more clarification in the documentation on io_service_time and io_wait_time
o Initialize blkg->stats_lock
o rename io_add_stat to blkio_add_stat and declare it static
o use bool for direction and sync
o derive direction and sync info from existing rq methods
o use 12 for major:minor string length
o define io_service_time better to cover the NCQ case
o add a separate reset_stats interface
o make the indexed stats a 2d array to simplify macro and function pointer code
o blkio.time now exports in jiffies as before
o Added stats description in patch description and
Documentation/cgroup/blkio-controller.txt
o Prefix all stats functions with blkio and make them static as applicable
o replace IO_TYPE_MAX with IO_TYPE_TOTAL
o Moved #define constant to top of blk-cgroup.c
o Pass dev_t around instead of char *
o Add note to documentation file about resetting stats
o use BLK_CGROUP_MODULE in addition to BLK_CGROUP config option in #ifdef
statements
o Avoid struct request specific knowledge in blk-cgroup. blk-cgroup.h now has
rq_direction() and rq_sync() functions which are used by CFQ and when using
io-controller at a higher level, bio_* functions can be added.
Signed-off-by: Divyesh Shah<dpshah@google.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'include/linux/blkdev.h')
-rw-r--r-- | include/linux/blkdev.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index f3fff8bf85ee..d483c494672a 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h | |||
@@ -1209,9 +1209,27 @@ static inline void set_io_start_time_ns(struct request *req) | |||
1209 | { | 1209 | { |
1210 | req->io_start_time_ns = sched_clock(); | 1210 | req->io_start_time_ns = sched_clock(); |
1211 | } | 1211 | } |
1212 | |||
1213 | static inline uint64_t rq_start_time_ns(struct request *req) | ||
1214 | { | ||
1215 | return req->start_time_ns; | ||
1216 | } | ||
1217 | |||
1218 | static inline uint64_t rq_io_start_time_ns(struct request *req) | ||
1219 | { | ||
1220 | return req->io_start_time_ns; | ||
1221 | } | ||
1212 | #else | 1222 | #else |
1213 | static inline void set_start_time_ns(struct request *req) {} | 1223 | static inline void set_start_time_ns(struct request *req) {} |
1214 | static inline void set_io_start_time_ns(struct request *req) {} | 1224 | static inline void set_io_start_time_ns(struct request *req) {} |
1225 | static inline uint64_t rq_start_time_ns(struct request *req) | ||
1226 | { | ||
1227 | return 0; | ||
1228 | } | ||
1229 | static inline uint64_t rq_io_start_time_ns(struct request *req) | ||
1230 | { | ||
1231 | return 0; | ||
1232 | } | ||
1215 | #endif | 1233 | #endif |
1216 | 1234 | ||
1217 | #define MODULE_ALIAS_BLOCKDEV(major,minor) \ | 1235 | #define MODULE_ALIAS_BLOCKDEV(major,minor) \ |