Lines Matching refs:events
43 err = percpu_counter_init(&p->events, 1); in fprop_global_init()
52 percpu_counter_destroy(&p->events); in fprop_global_destroy()
65 s64 events; in fprop_new_period() local
69 events = percpu_counter_sum(&p->events); in fprop_new_period()
73 if (events <= 1) { in fprop_new_period()
79 events -= events >> periods; in fprop_new_period()
81 percpu_counter_add(&p->events, -events); in fprop_new_period()
95 pl->events = 0; in fprop_local_init_single()
122 pl->events >>= period - pl->period; in fprop_reflect_period_single()
124 pl->events = 0; in fprop_reflect_period_single()
133 pl->events++; in __fprop_inc_single()
134 percpu_counter_add(&p->events, 1); in __fprop_inc_single()
148 num = pl->events; in fprop_fraction_single()
149 den = percpu_counter_read_positive(&p->events); in fprop_fraction_single()
175 err = percpu_counter_init(&pl->events, 0); in fprop_local_init_percpu()
185 percpu_counter_destroy(&pl->events); in fprop_local_destroy_percpu()
205 s64 val = percpu_counter_read(&pl->events); in fprop_reflect_period_percpu()
208 val = percpu_counter_sum(&pl->events); in fprop_reflect_period_percpu()
210 __percpu_counter_add(&pl->events, in fprop_reflect_period_percpu()
213 percpu_counter_set(&pl->events, 0); in fprop_reflect_period_percpu()
222 __percpu_counter_add(&pl->events, 1, PROP_BATCH); in __fprop_inc_percpu()
223 percpu_counter_add(&p->events, 1); in __fprop_inc_percpu()
236 num = percpu_counter_read_positive(&pl->events); in fprop_fraction_percpu()
237 den = percpu_counter_read_positive(&p->events); in fprop_fraction_percpu()
270 __percpu_counter_add(&pl->events, 1, PROP_BATCH); in __fprop_inc_percpu_max()
271 percpu_counter_add(&p->events, 1); in __fprop_inc_percpu_max()