rcu: Add a module parameter to force use of expedited RCU primitives
[firefly-linux-kernel-4.4.55.git] / kernel / srcu.c
index 97c465ebd8444cebc0f3a6e44ae0fdb04b552a2e..de9074047c92beffc237be9ecf93ca52b814a31d 100644 (file)
 #include <linux/delay.h>
 #include <linux/srcu.h>
 
+#include <trace/events/rcu.h>
+
+#include "rcu.h"
+
 /*
  * Initialize an rcu_batch structure to empty.
  */
@@ -464,7 +468,9 @@ static void __synchronize_srcu(struct srcu_struct *sp, int trycount)
  */
 void synchronize_srcu(struct srcu_struct *sp)
 {
-       __synchronize_srcu(sp, SYNCHRONIZE_SRCU_TRYCOUNT);
+       __synchronize_srcu(sp, rcu_expedited
+                          ? SYNCHRONIZE_SRCU_EXP_TRYCOUNT
+                          : SYNCHRONIZE_SRCU_TRYCOUNT);
 }
 EXPORT_SYMBOL_GPL(synchronize_srcu);