Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rcu: Detect stalls caused by failure to propagate up rcu_node tree

If all CPUs have passed through quiescent states, then stalls might be
due to starvation of the grace-period kthread or to failure to propagate
the quiescent states up the rcu_node combining tree. The current stall
warning messages do not differentiate, so this commit adds a printout
of the root rcu_node structure's ->qsmask field.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>

+3 -2
+3 -2
kernel/rcu/tree.c
··· 1196 1196 } else { 1197 1197 j = jiffies; 1198 1198 gpa = ACCESS_ONCE(rsp->gp_activity); 1199 - pr_err("All QSes seen, last %s kthread activity %ld (%ld-%ld), jiffies_till_next_fqs=%ld\n", 1199 + pr_err("All QSes seen, last %s kthread activity %ld (%ld-%ld), jiffies_till_next_fqs=%ld, root ->qsmask %#lx\n", 1200 1200 rsp->name, j - gpa, j, gpa, 1201 - jiffies_till_next_fqs); 1201 + jiffies_till_next_fqs, 1202 + rcu_get_root(rsp)->qsmask); 1202 1203 /* In this case, the current CPU might be at fault. */ 1203 1204 sched_show_task(current); 1204 1205 }