mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
block: Update to io-controller stats
Changelog from v1: o Call blkiocg_update_idle_time_stats() at cfq_rq_enqueued() instead of at dispatch time. Changelog from original patchset: (in response to Vivek Goyal's comments) o group blkiocg_update_blkio_group_dequeue_stats() with other DEBUG functions o rename blkiocg_update_set_active_queue_stats() to blkiocg_update_avg_queue_size_stats() o s/request/io/ in blkiocg_update_request_add_stats() and blkiocg_update_request_remove_stats() o Call cfq_del_timer() at request dispatch() instead of blkiocg_update_idle_time_stats() Signed-off-by: Divyesh Shah<[email protected]> Acked-by: Vivek Goyal <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
da69da184c
commit
a11cdaa7af
3 changed files with 28 additions and 32 deletions
|
|
@ -202,7 +202,7 @@ void blkiocg_update_idle_time_stats(struct blkio_group *blkg)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(blkiocg_update_idle_time_stats);
|
||||
|
||||
void blkiocg_update_set_active_queue_stats(struct blkio_group *blkg)
|
||||
void blkiocg_update_avg_queue_size_stats(struct blkio_group *blkg)
|
||||
{
|
||||
unsigned long flags;
|
||||
struct blkio_group_stats *stats;
|
||||
|
|
@ -216,14 +216,21 @@ void blkiocg_update_set_active_queue_stats(struct blkio_group *blkg)
|
|||
blkio_update_group_wait_time(stats);
|
||||
spin_unlock_irqrestore(&blkg->stats_lock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(blkiocg_update_set_active_queue_stats);
|
||||
EXPORT_SYMBOL_GPL(blkiocg_update_avg_queue_size_stats);
|
||||
|
||||
void blkiocg_update_dequeue_stats(struct blkio_group *blkg,
|
||||
unsigned long dequeue)
|
||||
{
|
||||
blkg->stats.dequeue += dequeue;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(blkiocg_update_dequeue_stats);
|
||||
#else
|
||||
static inline void blkio_set_start_group_wait_time(struct blkio_group *blkg,
|
||||
struct blkio_group *curr_blkg) {}
|
||||
static inline void blkio_end_empty_time(struct blkio_group_stats *stats) {}
|
||||
#endif
|
||||
|
||||
void blkiocg_update_request_add_stats(struct blkio_group *blkg,
|
||||
void blkiocg_update_io_add_stats(struct blkio_group *blkg,
|
||||
struct blkio_group *curr_blkg, bool direction,
|
||||
bool sync)
|
||||
{
|
||||
|
|
@ -236,9 +243,9 @@ void blkiocg_update_request_add_stats(struct blkio_group *blkg,
|
|||
blkio_set_start_group_wait_time(blkg, curr_blkg);
|
||||
spin_unlock_irqrestore(&blkg->stats_lock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(blkiocg_update_request_add_stats);
|
||||
EXPORT_SYMBOL_GPL(blkiocg_update_io_add_stats);
|
||||
|
||||
void blkiocg_update_request_remove_stats(struct blkio_group *blkg,
|
||||
void blkiocg_update_io_remove_stats(struct blkio_group *blkg,
|
||||
bool direction, bool sync)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
|
@ -248,7 +255,7 @@ void blkiocg_update_request_remove_stats(struct blkio_group *blkg,
|
|||
direction, sync);
|
||||
spin_unlock_irqrestore(&blkg->stats_lock, flags);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(blkiocg_update_request_remove_stats);
|
||||
EXPORT_SYMBOL_GPL(blkiocg_update_io_remove_stats);
|
||||
|
||||
void blkiocg_update_timeslice_used(struct blkio_group *blkg, unsigned long time)
|
||||
{
|
||||
|
|
@ -636,15 +643,6 @@ SHOW_FUNCTION_PER_GROUP(empty_time, BLKIO_STAT_EMPTY_TIME, 0);
|
|||
#endif
|
||||
#undef SHOW_FUNCTION_PER_GROUP
|
||||
|
||||
#ifdef CONFIG_DEBUG_BLK_CGROUP
|
||||
void blkiocg_update_dequeue_stats(struct blkio_group *blkg,
|
||||
unsigned long dequeue)
|
||||
{
|
||||
blkg->stats.dequeue += dequeue;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(blkiocg_update_dequeue_stats);
|
||||
#endif
|
||||
|
||||
static int blkio_check_dev_num(dev_t dev)
|
||||
{
|
||||
int part = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue