mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
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<[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
303a3acb23
commit
9195291e5f
5 changed files with 95 additions and 9 deletions
|
|
@ -112,12 +112,12 @@ static inline char *blkg_path(struct blkio_group *blkg)
|
|||
{
|
||||
return blkg->path;
|
||||
}
|
||||
void blkiocg_update_blkio_group_dequeue_stats(struct blkio_group *blkg,
|
||||
void blkiocg_update_dequeue_stats(struct blkio_group *blkg,
|
||||
unsigned long dequeue);
|
||||
#else
|
||||
static inline char *blkg_path(struct blkio_group *blkg) { return NULL; }
|
||||
static inline void blkiocg_update_blkio_group_dequeue_stats(
|
||||
struct blkio_group *blkg, unsigned long dequeue) {}
|
||||
static inline void blkiocg_update_dequeue_stats(struct blkio_group *blkg,
|
||||
unsigned long dequeue) {}
|
||||
#endif
|
||||
|
||||
#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,
|
|||
void *key);
|
||||
void blkiocg_update_timeslice_used(struct blkio_group *blkg,
|
||||
unsigned long time);
|
||||
void blkiocg_update_request_dispatch_stats(struct blkio_group *blkg,
|
||||
struct request *rq);
|
||||
void blkiocg_update_request_completion_stats(struct blkio_group *blkg,
|
||||
struct request *rq);
|
||||
#else
|
||||
struct cgroup;
|
||||
static inline struct blkio_cgroup *
|
||||
|
|
@ -147,5 +151,9 @@ static inline struct blkio_group *
|
|||
blkiocg_lookup_group(struct blkio_cgroup *blkcg, void *key) { return NULL; }
|
||||
static inline void blkiocg_update_timeslice_used(struct blkio_group *blkg,
|
||||
unsigned long time) {}
|
||||
static inline void blkiocg_update_request_dispatch_stats(
|
||||
struct blkio_group *blkg, struct request *rq) {}
|
||||
static inline void blkiocg_update_request_completion_stats(
|
||||
struct blkio_group *blkg, struct request *rq) {}
|
||||
#endif
|
||||
#endif /* _BLK_CGROUP_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue