Lines Matching refs:stat
21 void blk_rq_stat_init(struct blk_rq_stat *stat) in blk_rq_stat_init() argument
23 stat->min = -1ULL; in blk_rq_stat_init()
24 stat->max = stat->nr_samples = stat->mean = 0; in blk_rq_stat_init()
25 stat->batch = 0; in blk_rq_stat_init()
43 void blk_rq_stat_add(struct blk_rq_stat *stat, u64 value) in blk_rq_stat_add() argument
45 stat->min = min(stat->min, value); in blk_rq_stat_add()
46 stat->max = max(stat->max, value); in blk_rq_stat_add()
47 stat->batch += value; in blk_rq_stat_add()
48 stat->nr_samples++; in blk_rq_stat_add()
55 struct blk_rq_stat *stat; in blk_stat_add() local
73 stat = &per_cpu_ptr(cb->cpu_stat, cpu)[bucket]; in blk_stat_add()
74 blk_rq_stat_add(stat, value); in blk_stat_add()
87 blk_rq_stat_init(&cb->stat[bucket]); in blk_stat_timer_fn()
94 blk_rq_stat_sum(&cb->stat[bucket], &cpu_stat[bucket]); in blk_stat_timer_fn()
113 cb->stat = kmalloc_array(buckets, sizeof(struct blk_rq_stat), in blk_stat_alloc_callback()
115 if (!cb->stat) { in blk_stat_alloc_callback()
122 kfree(cb->stat); in blk_stat_alloc_callback()
177 kfree(cb->stat); in blk_stat_free_callback_rcu()