Skip to contentSkip to conversation

jrcu: better timer slop

PATCH New Joe Korty 1 participant 1 message Mar 24, 2011

lore
Share & tools
lore

Joe Korty

author
#0 lore raw

PATCH 23/24 jrcu: better timer slop

jrcu: fix broken timer slop

The expression

	USEC_PER_SEC / (HZ * 3 / 2)

was trying to define a period, in usec, some 50% larger than the natural HZ period. Instead it made a period some 30% shorter.

But such attempts are completely unnecessary. HZ alone works just fine.

kernel/jrcu.c +1 -1
Index: b/kernel/jrcu.c
===================================================================
@@ -131,7 +131,7 @@ static struct rcu_stats {
 
 #define RCU_HZ			(20)
 #define RCU_HZ_PERIOD_US	(USEC_PER_SEC / RCU_HZ)
-#define RCU_HZ_DELTA_US		(USEC_PER_SEC / (HZ * 3 / 2))
+#define RCU_HZ_DELTA_US		(USEC_PER_SEC / HZ)
 
 static int rcu_hz = RCU_HZ;
 static int rcu_hz_period_us = RCU_HZ_PERIOD_US;