Lines Matching refs:counters
67 s32 *pcount = per_cpu_ptr(fbc->counters, cpu); in percpu_counter_set()
98 count = this_cpu_read(*fbc->counters); in percpu_counter_add_batch()
106 count = __this_cpu_read(*fbc->counters); in percpu_counter_add_batch()
108 __this_cpu_sub(*fbc->counters, count); in percpu_counter_add_batch()
112 } while (!this_cpu_try_cmpxchg(*fbc->counters, &count, count + amount)); in percpu_counter_add_batch()
126 count = __this_cpu_read(*fbc->counters) + amount; in percpu_counter_add_batch()
130 __this_cpu_sub(*fbc->counters, count - amount); in percpu_counter_add_batch()
133 this_cpu_add(*fbc->counters, amount); in percpu_counter_add_batch()
152 count = __this_cpu_read(*fbc->counters); in percpu_counter_sync()
154 __this_cpu_sub(*fbc->counters, count); in percpu_counter_sync()
180 s32 *pcount = per_cpu_ptr(fbc->counters, cpu); in __percpu_counter_sum()
194 s32 __percpu *counters; in __percpu_counter_init_many() local
197 counter_size = ALIGN(sizeof(*counters), __alignof__(*counters)); in __percpu_counter_init_many()
198 counters = __alloc_percpu_gfp(nr_counters * counter_size, in __percpu_counter_init_many()
199 __alignof__(*counters), gfp); in __percpu_counter_init_many()
200 if (!counters) { in __percpu_counter_init_many()
201 fbc[0].counters = NULL; in __percpu_counter_init_many()
212 fbc[i].counters = (void __percpu *)counters + i * counter_size; in __percpu_counter_init_many()
235 if (!fbc[0].counters) in percpu_counter_destroy_many()
248 free_percpu(fbc[0].counters); in percpu_counter_destroy_many()
251 fbc[i].counters = NULL; in percpu_counter_destroy_many()
278 pcount = per_cpu_ptr(fbc->counters, cpu); in percpu_counter_cpu_dead()
340 count = __this_cpu_read(*fbc->counters); in __percpu_counter_limited_add()
346 this_cpu_add(*fbc->counters, amount); in __percpu_counter_limited_add()
372 pcount = per_cpu_ptr(fbc->counters, cpu); in __percpu_counter_limited_add()
385 count = __this_cpu_read(*fbc->counters); in __percpu_counter_limited_add()
387 __this_cpu_sub(*fbc->counters, count); in __percpu_counter_limited_add()