Skip to content

Commit f803945

Browse files
paulmckrcuurezki
authored andcommitted
rcutorture: Dump GP kthread state on insufficient cb-flood laundering
If a callback flood prevents grace period from completing, rcutorture does a WARN_ON(). Avoiding this WARN_ON() currently requires that at least three grace periods elapse during an eight-second callback-flood interval. Unfortunately, the current debug information does not include anything about the grace-period state. This commit therefore adds a call to cur_ops->gp_kthread_dbg(), if this function pointer is non-NULL. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
1 parent 0a0467a commit f803945

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

kernel/rcu/rcutorture.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2832,7 +2832,8 @@ static void rcu_torture_fwd_prog_cr(struct rcu_fwd *rfp)
28322832

28332833
if (!torture_must_stop() && !READ_ONCE(rcu_fwd_emergency_stop) &&
28342834
!shutdown_time_arrived()) {
2835-
WARN_ON(n_max_gps < MIN_FWD_CBS_LAUNDERED);
2835+
if (WARN_ON(n_max_gps < MIN_FWD_CBS_LAUNDERED) && cur_ops->gp_kthread_dbg)
2836+
cur_ops->gp_kthread_dbg();
28362837
pr_alert("%s Duration %lu barrier: %lu pending %ld n_launders: %ld n_launders_sa: %ld n_max_gps: %ld n_max_cbs: %ld cver %ld gps %ld #online %u\n",
28372838
__func__,
28382839
stoppedat - rfp->rcu_fwd_startat, jiffies - stoppedat,

0 commit comments

Comments
 (0)