• Home
  • Raw
  • Download

Lines Matching refs:stats

308 	struct cfqg_stats stats;	/* stats for this cfqg */  member
475 static inline void cfqg_stats_mark_##name(struct cfqg_stats *stats) \
477 stats->flags |= (1 << CFQG_stats_##name); \
479 static inline void cfqg_stats_clear_##name(struct cfqg_stats *stats) \
481 stats->flags &= ~(1 << CFQG_stats_##name); \
483 static inline int cfqg_stats_##name(struct cfqg_stats *stats) \
485 return (stats->flags & (1 << CFQG_stats_##name)) != 0; \
494 static void cfqg_stats_update_group_wait_time(struct cfqg_stats *stats) in CFQG_FLAG_FNS()
498 if (!cfqg_stats_waiting(stats)) in CFQG_FLAG_FNS()
502 if (time_after64(now, stats->start_group_wait_time)) in CFQG_FLAG_FNS()
503 blkg_stat_add(&stats->group_wait_time, in CFQG_FLAG_FNS()
504 now - stats->start_group_wait_time); in CFQG_FLAG_FNS()
505 cfqg_stats_clear_waiting(stats); in CFQG_FLAG_FNS()
512 struct cfqg_stats *stats = &cfqg->stats; in cfqg_stats_set_start_group_wait_time() local
514 if (cfqg_stats_waiting(stats)) in cfqg_stats_set_start_group_wait_time()
518 stats->start_group_wait_time = sched_clock(); in cfqg_stats_set_start_group_wait_time()
519 cfqg_stats_mark_waiting(stats); in cfqg_stats_set_start_group_wait_time()
523 static void cfqg_stats_end_empty_time(struct cfqg_stats *stats) in cfqg_stats_end_empty_time() argument
527 if (!cfqg_stats_empty(stats)) in cfqg_stats_end_empty_time()
531 if (time_after64(now, stats->start_empty_time)) in cfqg_stats_end_empty_time()
532 blkg_stat_add(&stats->empty_time, in cfqg_stats_end_empty_time()
533 now - stats->start_empty_time); in cfqg_stats_end_empty_time()
534 cfqg_stats_clear_empty(stats); in cfqg_stats_end_empty_time()
539 blkg_stat_add(&cfqg->stats.dequeue, 1); in cfqg_stats_update_dequeue()
544 struct cfqg_stats *stats = &cfqg->stats; in cfqg_stats_set_start_empty_time() local
546 if (blkg_rwstat_total(&stats->queued)) in cfqg_stats_set_start_empty_time()
554 if (cfqg_stats_empty(stats)) in cfqg_stats_set_start_empty_time()
557 stats->start_empty_time = sched_clock(); in cfqg_stats_set_start_empty_time()
558 cfqg_stats_mark_empty(stats); in cfqg_stats_set_start_empty_time()
563 struct cfqg_stats *stats = &cfqg->stats; in cfqg_stats_update_idle_time() local
565 if (cfqg_stats_idling(stats)) { in cfqg_stats_update_idle_time()
568 if (time_after64(now, stats->start_idle_time)) in cfqg_stats_update_idle_time()
569 blkg_stat_add(&stats->idle_time, in cfqg_stats_update_idle_time()
570 now - stats->start_idle_time); in cfqg_stats_update_idle_time()
571 cfqg_stats_clear_idling(stats); in cfqg_stats_update_idle_time()
577 struct cfqg_stats *stats = &cfqg->stats; in cfqg_stats_set_start_idle_time() local
579 BUG_ON(cfqg_stats_idling(stats)); in cfqg_stats_set_start_idle_time()
581 stats->start_idle_time = sched_clock(); in cfqg_stats_set_start_idle_time()
582 cfqg_stats_mark_idling(stats); in cfqg_stats_set_start_idle_time()
587 struct cfqg_stats *stats = &cfqg->stats; in cfqg_stats_update_avg_queue_size() local
589 blkg_stat_add(&stats->avg_queue_size_sum, in cfqg_stats_update_avg_queue_size()
590 blkg_rwstat_total(&stats->queued)); in cfqg_stats_update_avg_queue_size()
591 blkg_stat_add(&stats->avg_queue_size_samples, 1); in cfqg_stats_update_avg_queue_size()
592 cfqg_stats_update_group_wait_time(stats); in cfqg_stats_update_avg_queue_size()
598 static inline void cfqg_stats_end_empty_time(struct cfqg_stats *stats) { } in cfqg_stats_end_empty_time() argument
679 blkg_rwstat_add(&cfqg->stats.queued, op, 1); in cfqg_stats_update_io_add()
680 cfqg_stats_end_empty_time(&cfqg->stats); in cfqg_stats_update_io_add()
687 blkg_stat_add(&cfqg->stats.time, time); in cfqg_stats_update_timeslice_used()
689 blkg_stat_add(&cfqg->stats.unaccounted_time, unaccounted_time); in cfqg_stats_update_timeslice_used()
696 blkg_rwstat_add(&cfqg->stats.queued, op, -1); in cfqg_stats_update_io_remove()
702 blkg_rwstat_add(&cfqg->stats.merged, op, 1); in cfqg_stats_update_io_merged()
709 struct cfqg_stats *stats = &cfqg->stats; in cfqg_stats_update_completion() local
713 blkg_rwstat_add(&stats->service_time, op, now - io_start_time); in cfqg_stats_update_completion()
715 blkg_rwstat_add(&stats->wait_time, op, in cfqg_stats_update_completion()
720 static void cfqg_stats_reset(struct cfqg_stats *stats) in cfqg_stats_reset() argument
723 blkg_rwstat_reset(&stats->merged); in cfqg_stats_reset()
724 blkg_rwstat_reset(&stats->service_time); in cfqg_stats_reset()
725 blkg_rwstat_reset(&stats->wait_time); in cfqg_stats_reset()
726 blkg_stat_reset(&stats->time); in cfqg_stats_reset()
728 blkg_stat_reset(&stats->unaccounted_time); in cfqg_stats_reset()
729 blkg_stat_reset(&stats->avg_queue_size_sum); in cfqg_stats_reset()
730 blkg_stat_reset(&stats->avg_queue_size_samples); in cfqg_stats_reset()
731 blkg_stat_reset(&stats->dequeue); in cfqg_stats_reset()
732 blkg_stat_reset(&stats->group_wait_time); in cfqg_stats_reset()
733 blkg_stat_reset(&stats->idle_time); in cfqg_stats_reset()
734 blkg_stat_reset(&stats->empty_time); in cfqg_stats_reset()
771 cfqg_stats_add_aux(&parent->stats, &cfqg->stats); in cfqg_stats_xfer_dead()
772 cfqg_stats_reset(&cfqg->stats); in cfqg_stats_xfer_dead()
1541 static void cfqg_stats_exit(struct cfqg_stats *stats) in cfqg_stats_exit() argument
1543 blkg_rwstat_exit(&stats->merged); in cfqg_stats_exit()
1544 blkg_rwstat_exit(&stats->service_time); in cfqg_stats_exit()
1545 blkg_rwstat_exit(&stats->wait_time); in cfqg_stats_exit()
1546 blkg_rwstat_exit(&stats->queued); in cfqg_stats_exit()
1547 blkg_stat_exit(&stats->time); in cfqg_stats_exit()
1549 blkg_stat_exit(&stats->unaccounted_time); in cfqg_stats_exit()
1550 blkg_stat_exit(&stats->avg_queue_size_sum); in cfqg_stats_exit()
1551 blkg_stat_exit(&stats->avg_queue_size_samples); in cfqg_stats_exit()
1552 blkg_stat_exit(&stats->dequeue); in cfqg_stats_exit()
1553 blkg_stat_exit(&stats->group_wait_time); in cfqg_stats_exit()
1554 blkg_stat_exit(&stats->idle_time); in cfqg_stats_exit()
1555 blkg_stat_exit(&stats->empty_time); in cfqg_stats_exit()
1559 static int cfqg_stats_init(struct cfqg_stats *stats, gfp_t gfp) in cfqg_stats_init() argument
1561 if (blkg_rwstat_init(&stats->merged, gfp) || in cfqg_stats_init()
1562 blkg_rwstat_init(&stats->service_time, gfp) || in cfqg_stats_init()
1563 blkg_rwstat_init(&stats->wait_time, gfp) || in cfqg_stats_init()
1564 blkg_rwstat_init(&stats->queued, gfp) || in cfqg_stats_init()
1565 blkg_stat_init(&stats->time, gfp)) in cfqg_stats_init()
1569 if (blkg_stat_init(&stats->unaccounted_time, gfp) || in cfqg_stats_init()
1570 blkg_stat_init(&stats->avg_queue_size_sum, gfp) || in cfqg_stats_init()
1571 blkg_stat_init(&stats->avg_queue_size_samples, gfp) || in cfqg_stats_init()
1572 blkg_stat_init(&stats->dequeue, gfp) || in cfqg_stats_init()
1573 blkg_stat_init(&stats->group_wait_time, gfp) || in cfqg_stats_init()
1574 blkg_stat_init(&stats->idle_time, gfp) || in cfqg_stats_init()
1575 blkg_stat_init(&stats->empty_time, gfp)) in cfqg_stats_init()
1580 cfqg_stats_exit(stats); in cfqg_stats_init()
1635 if (cfqg_stats_init(&cfqg->stats, gfp)) { in cfq_pd_alloc()
1681 cfqg_stats_exit(&cfqg->stats); in cfq_pd_free()
1689 cfqg_stats_reset(&cfqg->stats); in cfq_pd_reset_stats()
2022 u64 samples = blkg_stat_read(&cfqg->stats.avg_queue_size_samples); in cfqg_prfill_avg_queue_size()
2026 v = blkg_stat_read(&cfqg->stats.avg_queue_size_sum); in cfqg_prfill_avg_queue_size()
2091 .private = offsetof(struct cfq_group, stats.time),
2110 .private = offsetof(struct cfq_group, stats.service_time),
2115 .private = offsetof(struct cfq_group, stats.wait_time),
2120 .private = offsetof(struct cfq_group, stats.merged),
2125 .private = offsetof(struct cfq_group, stats.queued),
2132 .private = offsetof(struct cfq_group, stats.time),
2151 .private = offsetof(struct cfq_group, stats.service_time),
2156 .private = offsetof(struct cfq_group, stats.wait_time),
2161 .private = offsetof(struct cfq_group, stats.merged),
2166 .private = offsetof(struct cfq_group, stats.queued),
2176 .private = offsetof(struct cfq_group, stats.group_wait_time),
2181 .private = offsetof(struct cfq_group, stats.idle_time),
2186 .private = offsetof(struct cfq_group, stats.empty_time),
2191 .private = offsetof(struct cfq_group, stats.dequeue),
2196 .private = offsetof(struct cfq_group, stats.unaccounted_time),