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; in fprop_new_period() local
70 events = percpu_counter_sum(&p->events); in fprop_new_period()
72 * Don't do anything if there are no events. in fprop_new_period()
74 if (events <= 1) { in fprop_new_period()
80 events -= events >> periods; in fprop_new_period()
81 /* Use addition to avoid losing events happening between sum and set */ in fprop_new_period()
82 percpu_counter_add(&p->events, -events); in fprop_new_period()
96 pl->events = 0; in fprop_local_init_single()
123 pl->events >>= period - pl->period; in fprop_reflect_period_single()
125 pl->events = 0; in fprop_reflect_period_single()
134 pl->events++; in __fprop_inc_single()
135 percpu_counter_add(&p->events, 1); in __fprop_inc_single()
138 /* Return fraction of events of type pl */
149 num = pl->events; in fprop_fraction_single()
150 den = percpu_counter_read_positive(&p->events); in fprop_fraction_single()
176 err = percpu_counter_init(&pl->events, 0, gfp); in fprop_local_init_percpu()
186 percpu_counter_destroy(&pl->events); in fprop_local_destroy_percpu()
206 s64 val = percpu_counter_read(&pl->events); in fprop_reflect_period_percpu()
209 val = percpu_counter_sum(&pl->events); in fprop_reflect_period_percpu()
211 percpu_counter_add_batch(&pl->events, in fprop_reflect_period_percpu()
214 percpu_counter_set(&pl->events, 0); in fprop_reflect_period_percpu()
223 percpu_counter_add_batch(&pl->events, 1, PROP_BATCH); in __fprop_inc_percpu()
224 percpu_counter_add(&p->events, 1); in __fprop_inc_percpu()
237 num = percpu_counter_read_positive(&pl->events); in fprop_fraction_percpu()
238 den = percpu_counter_read_positive(&p->events); in fprop_fraction_percpu()