aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2012-11-27 19:55:44 -0500
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2013-01-08 17:15:57 -0500
commit6d4b418c75a74eea1dd3701e106a9da8c335c451 (patch)
tree7ca38828ff65ade20dbe9390ae2749a6bec7a308
parentdc35c8934eba959b690921615fcd987e8bc17e4a (diff)
rcu: Trace callback acceleration
This commit adds event tracing for callback acceleration to allow better tracking of callbacks through the system. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-rw-r--r--include/trace/events/rcu.h6
-rw-r--r--kernel/rcutree.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
index d4f559b1ec34..5678114073b5 100644
--- a/include/trace/events/rcu.h
+++ b/include/trace/events/rcu.h
@@ -44,8 +44,10 @@ TRACE_EVENT(rcu_utilization,
44 * of a new grace period or the end of an old grace period ("cpustart" 44 * of a new grace period or the end of an old grace period ("cpustart"
45 * and "cpuend", respectively), a CPU passing through a quiescent 45 * and "cpuend", respectively), a CPU passing through a quiescent
46 * state ("cpuqs"), a CPU coming online or going offline ("cpuonl" 46 * state ("cpuqs"), a CPU coming online or going offline ("cpuonl"
47 * and "cpuofl", respectively), and a CPU being kicked for being too 47 * and "cpuofl", respectively), a CPU being kicked for being too
48 * long in dyntick-idle mode ("kick"). 48 * long in dyntick-idle mode ("kick"), a CPU accelerating its new
49 * callbacks to RCU_NEXT_READY_TAIL ("AccReadyCB"), and a CPU
50 * accelerating its new callbacks to RCU_WAIT_TAIL ("AccWaitCB").
49 */ 51 */
50TRACE_EVENT(rcu_grace_period, 52TRACE_EVENT(rcu_grace_period,
51 53
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index ac6a75d152ef..e9dce4fa76d8 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -1168,6 +1168,12 @@ static void rcu_accelerate_cbs(struct rcu_state *rsp, struct rcu_node *rnp,
1168 rdp->nxttail[i] = rdp->nxttail[RCU_NEXT_TAIL]; 1168 rdp->nxttail[i] = rdp->nxttail[RCU_NEXT_TAIL];
1169 rdp->nxtcompleted[i] = c; 1169 rdp->nxtcompleted[i] = c;
1170 } 1170 }
1171
1172 /* Trace depending on how much we were able to accelerate. */
1173 if (!*rdp->nxttail[RCU_WAIT_TAIL])
1174 trace_rcu_grace_period(rsp->name, rdp->gpnum, "AccWaitCB");
1175 else
1176 trace_rcu_grace_period(rsp->name, rdp->gpnum, "AccReadyCB");
1171} 1177}
1172 1178
1173/* 1179/*