Lines Matching full:count

70 	fbc->count = amount;  in percpu_counter_set()
89 s64 count; in percpu_counter_add_batch() local
93 count = __this_cpu_read(*fbc->counters) + amount; in percpu_counter_add_batch()
94 if (abs(count) >= batch) { in percpu_counter_add_batch()
96 fbc->count += count; in percpu_counter_add_batch()
97 __this_cpu_sub(*fbc->counters, count - amount); in percpu_counter_add_batch()
107 * For percpu_counter with a big batch, the devication of its count could
115 s64 count; in percpu_counter_sync() local
118 count = __this_cpu_read(*fbc->counters); in percpu_counter_sync()
119 fbc->count += count; in percpu_counter_sync()
120 __this_cpu_sub(*fbc->counters, count); in percpu_counter_sync()
132 * notifier called to fold the percpu count back into the global counter sum.
144 ret = fbc->count; in __percpu_counter_sum()
177 fbc[i].count = amount; in __percpu_counter_init_many()
245 fbc->count += *pcount; in percpu_counter_cpu_dead()
260 s64 count; in __percpu_counter_compare() local
262 count = percpu_counter_read(fbc); in __percpu_counter_compare()
263 /* Check to see if rough count will be sufficient for comparison */ in __percpu_counter_compare()
264 if (abs(count - rhs) > (batch * num_online_cpus())) { in __percpu_counter_compare()
265 if (count > rhs) in __percpu_counter_compare()
270 /* Need to use precise count */ in __percpu_counter_compare()
271 count = percpu_counter_sum(fbc); in __percpu_counter_compare()
272 if (count > rhs) in __percpu_counter_compare()
274 else if (count < rhs) in __percpu_counter_compare()
296 s64 count; in __percpu_counter_limited_add() local
306 count = __this_cpu_read(*fbc->counters); in __percpu_counter_limited_add()
309 if (abs(count + amount) <= batch && in __percpu_counter_limited_add()
310 ((amount > 0 && fbc->count + unknown <= limit) || in __percpu_counter_limited_add()
311 (amount < 0 && fbc->count - unknown >= limit))) { in __percpu_counter_limited_add()
318 count = fbc->count + amount; in __percpu_counter_limited_add()
322 if (count - unknown > limit) in __percpu_counter_limited_add()
324 if (count + unknown <= limit) in __percpu_counter_limited_add()
327 if (count + unknown < limit) in __percpu_counter_limited_add()
329 if (count - unknown >= limit) in __percpu_counter_limited_add()
339 count += *pcount; in __percpu_counter_limited_add()
342 if (count > limit) in __percpu_counter_limited_add()
345 if (count < limit) in __percpu_counter_limited_add()
351 count = __this_cpu_read(*fbc->counters); in __percpu_counter_limited_add()
352 fbc->count += count + amount; in __percpu_counter_limited_add()
353 __this_cpu_sub(*fbc->counters, count); in __percpu_counter_limited_add()