summaryrefslogtreecommitdiffstats
path: root/kernel/rcu/tree.c
diff options
context:
space:
mode:
authorPaul E. McKenney2018-10-04 02:25:33 +0200
committerPaul E. McKenney2018-12-01 21:45:40 +0100
commitc51d7b5e6c94aa6b554c27bd2b0eb64ebef02334 (patch)
tree418086e10572a6dd2411f1a030129768542a167e /kernel/rcu/tree.c
parentrcutorture: Print histogram of CB invocation at OOM time (diff)
downloadkernel-qcow2-linux-c51d7b5e6c94aa6b554c27bd2b0eb64ebef02334.tar.gz
kernel-qcow2-linux-c51d7b5e6c94aa6b554c27bd2b0eb64ebef02334.tar.xz
kernel-qcow2-linux-c51d7b5e6c94aa6b554c27bd2b0eb64ebef02334.zip
rcutorture: Print time since GP end upon forward-progress failure
If rcutorture's forward-progress tests fail while a grace period is not in progress, it is useful to print the time since the last grace period ended as a way to detect failure to launch a new grace period. This commit therefore makes this change. Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
Diffstat (limited to 'kernel/rcu/tree.c')
-rw-r--r--kernel/rcu/tree.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index f91631541965..9180158756d2 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -2000,7 +2000,8 @@ static void rcu_gp_cleanup(void)
WRITE_ONCE(rcu_state.gp_activity, jiffies);
raw_spin_lock_irq_rcu_node(rnp);
- gp_duration = jiffies - rcu_state.gp_start;
+ rcu_state.gp_end = jiffies;
+ gp_duration = rcu_state.gp_end - rcu_state.gp_start;
if (gp_duration > rcu_state.gp_max)
rcu_state.gp_max = gp_duration;
@@ -2686,6 +2687,8 @@ void rcu_fwd_progress_check(unsigned long j)
__func__, jiffies - rcu_state.gp_start);
show_rcu_gp_kthreads();
} else {
+ pr_info("%s: Last GP end %lu jiffies ago\n",
+ __func__, jiffies - rcu_state.gp_end);
preempt_disable();
rdp = this_cpu_ptr(&rcu_data);
rcu_check_gp_start_stall(rdp->mynode, rdp, j);