Skip to contentSkip to conversation

lib-flex_proportionsc-cleanup-__fprop_inc_percpu_max.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jun 5, 2020

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: lib/flex_proportions.c: cleanup __fprop_inc_percpu_max
has been removed from the -mm tree. Its filename was
lib-flex_proportionsc-cleanup-__fprop_inc_percpu_max.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Tan Hu <[email protected]>
Subject: lib/flex_proportions.c: cleanup __fprop_inc_percpu_max

If the given type has fraction smaller than max_frac/FPROP_FRAC_BASE, the code could be modified to call __fprop_inc_percpu() directly and easier to understand. After this patch, fprop_reflect_period_percpu() will be called twice, and quicky return on pl->period == p->period test, so it would not result to significant downside of performance.

Thanks for Jan's guidance.

---

 lib/flex_proportions.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)
lib/flex_proportions.c renamed from lib/flex_proportions.c~lib-flex_proportionsc-cleanup-__fprop_inc_percpu_max +3 -4
@@ -266,8 +266,7 @@ void __fprop_inc_percpu_max(struct fprop
 		if (numerator >
 		    (((u64)denominator) * max_frac) >> FPROP_FRAC_SHIFT)
 			return;
-	} else
-		fprop_reflect_period_percpu(p, pl);
-	percpu_counter_add_batch(&pl->events, 1, PROP_BATCH);
-	percpu_counter_add(&p->events, 1);
+	}
+
+	__fprop_inc_percpu(p, pl);
 }

_

Patches currently in -mm which might be from [email protected] are