|
@@ -279,6 +279,21 @@ void rcu_bh_force_quiescent_state(void)
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(rcu_bh_force_quiescent_state);
|
|
|
|
|
|
+/*
|
|
|
+ * Show the state of the grace-period kthreads.
|
|
|
+ */
|
|
|
+void show_rcu_gp_kthreads(void)
|
|
|
+{
|
|
|
+ struct rcu_state *rsp;
|
|
|
+
|
|
|
+ for_each_rcu_flavor(rsp) {
|
|
|
+ pr_info("%s: wait state: %d ->state: %#lx\n",
|
|
|
+ rsp->name, rsp->gp_state, rsp->gp_kthread->state);
|
|
|
+ /* sched_show_task(rsp->gp_kthread); */
|
|
|
+ }
|
|
|
+}
|
|
|
+EXPORT_SYMBOL_GPL(show_rcu_gp_kthreads);
|
|
|
+
|
|
|
/*
|
|
|
* Record the number of times rcutorture tests have been initiated and
|
|
|
* terminated. This information allows the debugfs tracing stats to be
|
|
@@ -1626,6 +1641,7 @@ static int __noreturn rcu_gp_kthread(void *arg)
|
|
|
trace_rcu_grace_period(rsp->name,
|
|
|
ACCESS_ONCE(rsp->gpnum),
|
|
|
TPS("reqwait"));
|
|
|
+ rsp->gp_state = RCU_GP_WAIT_GPS;
|
|
|
wait_event_interruptible(rsp->gp_wq,
|
|
|
ACCESS_ONCE(rsp->gp_flags) &
|
|
|
RCU_GP_FLAG_INIT);
|
|
@@ -1653,6 +1669,7 @@ static int __noreturn rcu_gp_kthread(void *arg)
|
|
|
trace_rcu_grace_period(rsp->name,
|
|
|
ACCESS_ONCE(rsp->gpnum),
|
|
|
TPS("fqswait"));
|
|
|
+ rsp->gp_state = RCU_GP_WAIT_FQS;
|
|
|
ret = wait_event_interruptible_timeout(rsp->gp_wq,
|
|
|
((gf = ACCESS_ONCE(rsp->gp_flags)) &
|
|
|
RCU_GP_FLAG_FQS) ||
|