Lines Matching refs:rwstat
35 static inline u64 blkg_rwstat_read_counter(struct blkg_rwstat *rwstat, in blkg_rwstat_read_counter() argument
38 return atomic64_read(&rwstat->aux_cnt[idx]) + in blkg_rwstat_read_counter()
39 percpu_counter_sum_positive(&rwstat->cpu_cnt[idx]); in blkg_rwstat_read_counter()
42 int blkg_rwstat_init(struct blkg_rwstat *rwstat, gfp_t gfp);
43 void blkg_rwstat_exit(struct blkg_rwstat *rwstat);
45 const struct blkg_rwstat_sample *rwstat);
61 static inline void blkg_rwstat_add(struct blkg_rwstat *rwstat, in blkg_rwstat_add() argument
67 cnt = &rwstat->cpu_cnt[BLKG_RWSTAT_DISCARD]; in blkg_rwstat_add()
69 cnt = &rwstat->cpu_cnt[BLKG_RWSTAT_WRITE]; in blkg_rwstat_add()
71 cnt = &rwstat->cpu_cnt[BLKG_RWSTAT_READ]; in blkg_rwstat_add()
76 cnt = &rwstat->cpu_cnt[BLKG_RWSTAT_SYNC]; in blkg_rwstat_add()
78 cnt = &rwstat->cpu_cnt[BLKG_RWSTAT_ASYNC]; in blkg_rwstat_add()
89 static inline void blkg_rwstat_read(struct blkg_rwstat *rwstat, in blkg_rwstat_read() argument
96 percpu_counter_sum_positive(&rwstat->cpu_cnt[i]); in blkg_rwstat_read()
107 static inline uint64_t blkg_rwstat_total(struct blkg_rwstat *rwstat) in blkg_rwstat_total() argument
111 blkg_rwstat_read(rwstat, &tmp); in blkg_rwstat_total()
119 static inline void blkg_rwstat_reset(struct blkg_rwstat *rwstat) in blkg_rwstat_reset() argument
124 percpu_counter_set(&rwstat->cpu_cnt[i], 0); in blkg_rwstat_reset()
125 atomic64_set(&rwstat->aux_cnt[i], 0); in blkg_rwstat_reset()