Lines Matching full:events

14  * Where x_{i,j} is j's number of events in i-th last time period and x_i is
15 * total number of events in i-th last time period.
43 /* Use 1 to avoid dealing with periods with 0 events... */ in fprop_global_init()
44 err = percpu_counter_init(&p->events, 1, gfp); in fprop_global_init()
53 percpu_counter_destroy(&p->events); in fprop_global_destroy()
61 * if aging zeroed out all events. This can be used to detect whether declaring
66 s64 events = percpu_counter_sum(&p->events); in fprop_new_period() local
69 * Don't do anything if there are no events. in fprop_new_period()
71 if (events <= 1) in fprop_new_period()
76 events -= events >> periods; in fprop_new_period()
77 /* Use addition to avoid losing events happening between sum and set */ in fprop_new_period()
78 percpu_counter_add(&p->events, -events); in fprop_new_period()
92 pl->events = 0; in fprop_local_init_single()
119 pl->events >>= period - pl->period; in fprop_reflect_period_single()
121 pl->events = 0; in fprop_reflect_period_single()
130 pl->events++; in __fprop_inc_single()
131 percpu_counter_add(&p->events, 1); in __fprop_inc_single()
134 /* Return fraction of events of type pl */
145 num = pl->events; in fprop_fraction_single()
146 den = percpu_counter_read_positive(&p->events); in fprop_fraction_single()
172 err = percpu_counter_init(&pl->events, 0, gfp); in fprop_local_init_percpu()
182 percpu_counter_destroy(&pl->events); in fprop_local_destroy_percpu()
202 s64 val = percpu_counter_read(&pl->events); in fprop_reflect_period_percpu()
205 val = percpu_counter_sum(&pl->events); in fprop_reflect_period_percpu()
207 percpu_counter_add_batch(&pl->events, in fprop_reflect_period_percpu()
210 percpu_counter_set(&pl->events, 0); in fprop_reflect_period_percpu()
220 percpu_counter_add_batch(&pl->events, nr, PROP_BATCH); in __fprop_add_percpu()
221 percpu_counter_add(&p->events, nr); in __fprop_add_percpu()
234 num = percpu_counter_read_positive(&pl->events); in fprop_fraction_percpu()
235 den = percpu_counter_read_positive(&p->events); in fprop_fraction_percpu()