Lines Matching refs:stat
20 void blk_rq_stat_init(struct blk_rq_stat *stat) in blk_rq_stat_init() argument
22 stat->min = -1ULL; in blk_rq_stat_init()
23 stat->max = stat->nr_samples = stat->mean = 0; in blk_rq_stat_init()
24 stat->batch = 0; in blk_rq_stat_init()
42 void blk_rq_stat_add(struct blk_rq_stat *stat, u64 value) in blk_rq_stat_add() argument
44 stat->min = min(stat->min, value); in blk_rq_stat_add()
45 stat->max = max(stat->max, value); in blk_rq_stat_add()
46 stat->batch += value; in blk_rq_stat_add()
47 stat->nr_samples++; in blk_rq_stat_add()
54 struct blk_rq_stat *stat; in blk_stat_add() local
71 stat = &get_cpu_ptr(cb->cpu_stat)[bucket]; in blk_stat_add()
72 blk_rq_stat_add(stat, value); in blk_stat_add()
85 blk_rq_stat_init(&cb->stat[bucket]); in blk_stat_timer_fn()
92 blk_rq_stat_sum(&cb->stat[bucket], &cpu_stat[bucket]); in blk_stat_timer_fn()
111 cb->stat = kmalloc_array(buckets, sizeof(struct blk_rq_stat), in blk_stat_alloc_callback()
113 if (!cb->stat) { in blk_stat_alloc_callback()
120 kfree(cb->stat); in blk_stat_alloc_callback()
175 kfree(cb->stat); in blk_stat_free_callback_rcu()