summaryrefslogtreecommitdiffstats
path: root/kernel/rcutree.c
diff options
context:
space:
mode:
authorPaul E. McKenney2013-08-10 01:02:09 +0200
committerPaul E. McKenney2013-09-23 18:18:08 +0200
commitbb311eccbdab974639263060b8452bf304af0b0c (patch)
tree0265d33c06302fba42157e2b231862fce7de6766 /kernel/rcutree.c
parentrcu: Add tracing to rcu_gp_kthread() (diff)
downloadkernel-qcow2-linux-bb311eccbdab974639263060b8452bf304af0b0c.tar.gz
kernel-qcow2-linux-bb311eccbdab974639263060b8452bf304af0b0c.tar.xz
kernel-qcow2-linux-bb311eccbdab974639263060b8452bf304af0b0c.zip
rcu: Add tracing of normal (non-NOCB) grace-period requests
This commit adds tracing to the normal grace-period request points. These are rcu_gp_cleanup(), which checks for the need for another grace period at the end of the previous grace period, and rcu_start_gp_advanced(), which restarts RCU's state machine after an idle period. These trace events are intended to help track down bugs where RCU remains idle despite there being work for it to do. Reported-by: Clark Williams <williams@redhat.com> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcutree.c')
-rw-r--r--kernel/rcutree.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 78d371526667..54dd6d03dbb5 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1459,8 +1459,12 @@ static void rcu_gp_cleanup(struct rcu_state *rsp)
rsp->fqs_state = RCU_GP_IDLE;
rdp = this_cpu_ptr(rsp->rda);
rcu_advance_cbs(rsp, rnp, rdp); /* Reduce false positives below. */
- if (cpu_needs_another_gp(rsp, rdp))
+ if (cpu_needs_another_gp(rsp, rdp)) {
rsp->gp_flags = 1;
+ trace_rcu_grace_period(rsp->name,
+ ACCESS_ONCE(rsp->gpnum),
+ TPS("newreq"));
+ }
raw_spin_unlock_irq(&rnp->lock);
}
@@ -1584,6 +1588,8 @@ rcu_start_gp_advanced(struct rcu_state *rsp, struct rcu_node *rnp,
return;
}
rsp->gp_flags = RCU_GP_FLAG_INIT;
+ trace_rcu_grace_period(rsp->name, ACCESS_ONCE(rsp->gpnum),
+ TPS("newreq"));
/*
* We can't do wakeups while holding the rnp->lock, as that