rcu: Make RCU_CPU_STALL_INFO include number of fqs attempts

One way that an RCU CPU stall warning can happen is if the grace-period
kthread is not allowed to execute.  One proxy for this kthread's
forward progress is the number of force-quiescent-state (fqs) scans.
This commit therefore adds the number of fqs scans to the RCU CPU stall
warning printouts when CONFIG_RCU_CPU_STALL_INFO=y.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: fc908ed33e7c1428f799abb12399f906da03b397
[pdaly@codeaurora.org Resolve convlicts from declining
26cdfedf6a902345f8604ea8e0b7dd2566b37a46]
Change-Id: I6d4a5088dff2a499593862bb0a2e2fb604ffc393
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
This commit is contained in:
Paul E. McKenney 2014-12-08 09:57:48 -08:00 committed by Patrick Daly
parent 103a92fc02
commit 9f269d5020
3 changed files with 5 additions and 1 deletions

View File

@ -823,6 +823,7 @@ static void record_gp_stall_check_time(struct rcu_state *rsp)
{
rsp->gp_start = jiffies;
rsp->jiffies_stall = jiffies + rcu_jiffies_till_stall_check();
rsp->n_force_qs_gpstart = ACCESS_ONCE(rsp->n_force_qs);
}
/*

View File

@ -440,6 +440,8 @@ struct rcu_state {
/* activity in jiffies. */
unsigned long jiffies_stall; /* Time at which to check */
/* for CPU stalls. */
unsigned long n_force_qs_gpstart; /* Snapshot of n_force_qs at */
/* GP start. */
unsigned long gp_max; /* Maximum GP duration in */
/* jiffies. */
char *name; /* Name of structure. */

View File

@ -1915,11 +1915,12 @@ static void print_cpu_stall_info(struct rcu_state *rsp, int cpu)
ticks_value = rsp->gpnum - rdp->gpnum;
}
print_cpu_stall_fast_no_hz(fast_no_hz, cpu);
printk(KERN_ERR "\t%d: (%lu %s) idle=%03x/%llx/%d softirq=%u/%u %s\n",
pr_err("\t%d: (%lu %s) idle=%03x/%llx/%d softirq=%u/%u fqs=%ld %s\n",
cpu, ticks_value, ticks_title,
atomic_read(&rdtp->dynticks) & 0xfff,
rdtp->dynticks_nesting, rdtp->dynticks_nmi_nesting,
rdp->softirq_snap, kstat_softirqs_cpu(RCU_SOFTIRQ, cpu),
ACCESS_ONCE(rsp->n_force_qs) - rsp->n_force_qs_gpstart,
fast_no_hz);
}