diff options
| author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2014-12-08 12:57:48 -0500 |
|---|---|---|
| committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2015-01-06 14:05:25 -0500 |
| commit | fc908ed33e7c1428f799abb12399f906da03b397 (patch) | |
| tree | 329342ea2dd85f88d6dae001790d5912342fd005 /kernel/rcu | |
| parent | e9408e4f278875aa5862560b4b425b27dfcb643f (diff) | |
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>
Diffstat (limited to 'kernel/rcu')
| -rw-r--r-- | kernel/rcu/tree.c | 1 | ||||
| -rw-r--r-- | kernel/rcu/tree.h | 2 | ||||
| -rw-r--r-- | kernel/rcu/tree_plugin.h | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 4c106fcc0d54..654b15be1e36 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c | |||
| @@ -1043,6 +1043,7 @@ static void record_gp_stall_check_time(struct rcu_state *rsp) | |||
| 1043 | j1 = rcu_jiffies_till_stall_check(); | 1043 | j1 = rcu_jiffies_till_stall_check(); |
| 1044 | ACCESS_ONCE(rsp->jiffies_stall) = j + j1; | 1044 | ACCESS_ONCE(rsp->jiffies_stall) = j + j1; |
| 1045 | rsp->jiffies_resched = j + j1 / 2; | 1045 | rsp->jiffies_resched = j + j1 / 2; |
| 1046 | rsp->n_force_qs_gpstart = ACCESS_ONCE(rsp->n_force_qs); | ||
| 1046 | } | 1047 | } |
| 1047 | 1048 | ||
| 1048 | /* | 1049 | /* |
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h index 8e7b1843896e..e300848cc0cf 100644 --- a/kernel/rcu/tree.h +++ b/kernel/rcu/tree.h | |||
| @@ -492,6 +492,8 @@ struct rcu_state { | |||
| 492 | /* for CPU stalls. */ | 492 | /* for CPU stalls. */ |
| 493 | unsigned long jiffies_resched; /* Time at which to resched */ | 493 | unsigned long jiffies_resched; /* Time at which to resched */ |
| 494 | /* a reluctant CPU. */ | 494 | /* a reluctant CPU. */ |
| 495 | unsigned long n_force_qs_gpstart; /* Snapshot of n_force_qs at */ | ||
| 496 | /* GP start. */ | ||
| 495 | unsigned long gp_max; /* Maximum GP duration in */ | 497 | unsigned long gp_max; /* Maximum GP duration in */ |
| 496 | /* jiffies. */ | 498 | /* jiffies. */ |
| 497 | const char *name; /* Name of structure. */ | 499 | const char *name; /* Name of structure. */ |
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h index 3ec85cb5d544..769384d77437 100644 --- a/kernel/rcu/tree_plugin.h +++ b/kernel/rcu/tree_plugin.h | |||
| @@ -1898,11 +1898,12 @@ static void print_cpu_stall_info(struct rcu_state *rsp, int cpu) | |||
| 1898 | ticks_value = rsp->gpnum - rdp->gpnum; | 1898 | ticks_value = rsp->gpnum - rdp->gpnum; |
| 1899 | } | 1899 | } |
| 1900 | print_cpu_stall_fast_no_hz(fast_no_hz, cpu); | 1900 | print_cpu_stall_fast_no_hz(fast_no_hz, cpu); |
| 1901 | pr_err("\t%d: (%lu %s) idle=%03x/%llx/%d softirq=%u/%u %s\n", | 1901 | pr_err("\t%d: (%lu %s) idle=%03x/%llx/%d softirq=%u/%u fqs=%ld %s\n", |
| 1902 | cpu, ticks_value, ticks_title, | 1902 | cpu, ticks_value, ticks_title, |
| 1903 | atomic_read(&rdtp->dynticks) & 0xfff, | 1903 | atomic_read(&rdtp->dynticks) & 0xfff, |
| 1904 | rdtp->dynticks_nesting, rdtp->dynticks_nmi_nesting, | 1904 | rdtp->dynticks_nesting, rdtp->dynticks_nmi_nesting, |
| 1905 | rdp->softirq_snap, kstat_softirqs_cpu(RCU_SOFTIRQ, cpu), | 1905 | rdp->softirq_snap, kstat_softirqs_cpu(RCU_SOFTIRQ, cpu), |
| 1906 | ACCESS_ONCE(rsp->n_force_qs) - rsp->n_force_qs_gpstart, | ||
| 1906 | fast_no_hz); | 1907 | fast_no_hz); |
| 1907 | } | 1908 | } |
| 1908 | 1909 | ||
