aboutsummaryrefslogtreecommitdiffstats
path: root/lib/flex_proportions.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/flex_proportions.c')
-rw-r--r--lib/flex_proportions.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/flex_proportions.c b/lib/flex_proportions.c
index a71cf1bdd4c9..2cc1f94e03a1 100644
--- a/lib/flex_proportions.c
+++ b/lib/flex_proportions.c
@@ -207,7 +207,7 @@ static void fprop_reflect_period_percpu(struct fprop_global *p,
207 if (val < (nr_cpu_ids * PROP_BATCH)) 207 if (val < (nr_cpu_ids * PROP_BATCH))
208 val = percpu_counter_sum(&pl->events); 208 val = percpu_counter_sum(&pl->events);
209 209
210 __percpu_counter_add(&pl->events, 210 percpu_counter_add_batch(&pl->events,
211 -val + (val >> (period-pl->period)), PROP_BATCH); 211 -val + (val >> (period-pl->period)), PROP_BATCH);
212 } else 212 } else
213 percpu_counter_set(&pl->events, 0); 213 percpu_counter_set(&pl->events, 0);
@@ -219,7 +219,7 @@ static void fprop_reflect_period_percpu(struct fprop_global *p,
219void __fprop_inc_percpu(struct fprop_global *p, struct fprop_local_percpu *pl) 219void __fprop_inc_percpu(struct fprop_global *p, struct fprop_local_percpu *pl)
220{ 220{
221 fprop_reflect_period_percpu(p, pl); 221 fprop_reflect_period_percpu(p, pl);
222 __percpu_counter_add(&pl->events, 1, PROP_BATCH); 222 percpu_counter_add_batch(&pl->events, 1, PROP_BATCH);
223 percpu_counter_add(&p->events, 1); 223 percpu_counter_add(&p->events, 1);
224} 224}
225 225
@@ -267,6 +267,6 @@ void __fprop_inc_percpu_max(struct fprop_global *p,
267 return; 267 return;
268 } else 268 } else
269 fprop_reflect_period_percpu(p, pl); 269 fprop_reflect_period_percpu(p, pl);
270 __percpu_counter_add(&pl->events, 1, PROP_BATCH); 270 percpu_counter_add_batch(&pl->events, 1, PROP_BATCH);
271 percpu_counter_add(&p->events, 1); 271 percpu_counter_add(&p->events, 1);
272} 272}