Lines Matching +full:off +full:- +full:by

1 /* SPDX-License-Identifier: GPL-2.0
3 * Legacy blkg rwstat helpers enabled by CONFIG_BLK_CGROUP_RWSTAT.
6 #include "blk-cgroup-rwstat.h"
12 ret = percpu_counter_init_many(rwstat->cpu_cnt, 0, gfp, BLKG_RWSTAT_NR); in blkg_rwstat_init()
17 atomic64_set(&rwstat->aux_cnt[i], 0); in blkg_rwstat_init()
24 percpu_counter_destroy_many(rwstat->cpu_cnt, BLKG_RWSTAT_NR); in blkg_rwstat_exit()
29 * __blkg_prfill_rwstat - prfill helper for a blkg_rwstat
46 const char *dname = blkg_dev_name(pd->blkg); in __blkg_prfill_rwstat()
55 rwstat->cnt[i]); in __blkg_prfill_rwstat()
57 v = rwstat->cnt[BLKG_RWSTAT_READ] + in __blkg_prfill_rwstat()
58 rwstat->cnt[BLKG_RWSTAT_WRITE] + in __blkg_prfill_rwstat()
59 rwstat->cnt[BLKG_RWSTAT_DISCARD]; in __blkg_prfill_rwstat()
66 * blkg_prfill_rwstat - prfill callback for blkg_rwstat
69 * @off: offset to the blkg_rwstat in @pd
74 int off) in blkg_prfill_rwstat() argument
78 blkg_rwstat_read((void *)pd + off, &rwstat); in blkg_prfill_rwstat()
84 * blkg_rwstat_recursive_sum - collect hierarchical blkg_rwstat
87 * @off: offset to the blkg_rwstat in blkg_policy_data or @blkg
90 * Collect the blkg_rwstat specified by @blkg, @pol and @off and all its
94 * If @pol is NULL, blkg_rwstat is at @off bytes into @blkg; otherwise, it
95 * is at @off bytes into @blkg's blkg_policy_data of the policy.
98 int off, struct blkg_rwstat_sample *sum) in blkg_rwstat_recursive_sum() argument
104 lockdep_assert_held(&blkg->q->queue_lock); in blkg_rwstat_recursive_sum()
111 if (!pos_blkg->online) in blkg_rwstat_recursive_sum()
115 rwstat = (void *)blkg_to_pd(pos_blkg, pol) + off; in blkg_rwstat_recursive_sum()
117 rwstat = (void *)pos_blkg + off; in blkg_rwstat_recursive_sum()
120 sum->cnt[i] += blkg_rwstat_read_counter(rwstat, i); in blkg_rwstat_recursive_sum()