|
@@ -28,6 +28,7 @@
|
|
|
#include <linux/gfp.h>
|
|
|
#include <linux/oom.h>
|
|
|
#include <linux/smpboot.h>
|
|
|
+#include <linux/tick.h>
|
|
|
|
|
|
#define RCU_KTHREAD_PRIO 1
|
|
|
|
|
@@ -2502,3 +2503,20 @@ static void __init rcu_init_nocb(void)
|
|
|
}
|
|
|
|
|
|
#endif /* #else #ifdef CONFIG_RCU_NOCB_CPU */
|
|
|
+
|
|
|
+/*
|
|
|
+ * An adaptive-ticks CPU can potentially execute in kernel mode for an
|
|
|
+ * arbitrarily long period of time with the scheduling-clock tick turned
|
|
|
+ * off. RCU will be paying attention to this CPU because it is in the
|
|
|
+ * kernel, but the CPU cannot be guaranteed to be executing the RCU state
|
|
|
+ * machine because the scheduling-clock tick has been disabled. Therefore,
|
|
|
+ * if an adaptive-ticks CPU is failing to respond to the current grace
|
|
|
+ * period and has not be idle from an RCU perspective, kick it.
|
|
|
+ */
|
|
|
+static void rcu_kick_nohz_cpu(int cpu)
|
|
|
+{
|
|
|
+#ifdef CONFIG_NO_HZ_FULL
|
|
|
+ if (tick_nohz_full_cpu(cpu))
|
|
|
+ smp_send_reschedule(cpu);
|
|
|
+#endif /* #ifdef CONFIG_NO_HZ_FULL */
|
|
|
+}
|