Re: [PATCH tip/core/rcu 2/2] rcu: Trace callback acceleration

2013-01-27 Thread Josh Triplett
You probably don't want to use --chain-reply-to; that makes patch N a
reply to patch N-1 rather than to the cover letter, which creates much
deeper and harder to follow threads.

- Josh Triplett
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [PATCH tip/core/rcu 2/2] rcu: Trace callback acceleration

2013-01-27 Thread Josh Triplett
You probably don't want to use --chain-reply-to; that makes patch N a
reply to patch N-1 rather than to the cover letter, which creates much
deeper and harder to follow threads.

- Josh Triplett
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH tip/core/rcu 2/2] rcu: Trace callback acceleration

2013-01-26 Thread Paul E. McKenney
From: "Paul E. McKenney" 

This commit adds event tracing for callback acceleration to allow better
tracking of callbacks through the system.

Signed-off-by: Paul E. McKenney 
---
 include/trace/events/rcu.h |6 --
 kernel/rcutree.c   |6 ++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
index d4f559b..5678114 100644
--- a/include/trace/events/rcu.h
+++ b/include/trace/events/rcu.h
@@ -44,8 +44,10 @@ TRACE_EVENT(rcu_utilization,
  * of a new grace period or the end of an old grace period ("cpustart"
  * and "cpuend", respectively), a CPU passing through a quiescent
  * state ("cpuqs"), a CPU coming online or going offline ("cpuonl"
- * and "cpuofl", respectively), and a CPU being kicked for being too
- * long in dyntick-idle mode ("kick").
+ * and "cpuofl", respectively), a CPU being kicked for being too
+ * long in dyntick-idle mode ("kick"), a CPU accelerating its new
+ * callbacks to RCU_NEXT_READY_TAIL ("AccReadyCB"), and a CPU
+ * accelerating its new callbacks to RCU_WAIT_TAIL ("AccWaitCB").
  */
 TRACE_EVENT(rcu_grace_period,
 
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index ac6a75d..e9dce4f 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,
rdp->nxttail[i] = rdp->nxttail[RCU_NEXT_TAIL];
rdp->nxtcompleted[i] = c;
}
+
+   /* Trace depending on how much we were able to accelerate. */
+   if (!*rdp->nxttail[RCU_WAIT_TAIL])
+   trace_rcu_grace_period(rsp->name, rdp->gpnum, "AccWaitCB");
+   else
+   trace_rcu_grace_period(rsp->name, rdp->gpnum, "AccReadyCB");
 }
 
 /*
-- 
1.7.8

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[PATCH tip/core/rcu 2/2] rcu: Trace callback acceleration

2013-01-26 Thread Paul E. McKenney
From: Paul E. McKenney paul...@linux.vnet.ibm.com

This commit adds event tracing for callback acceleration to allow better
tracking of callbacks through the system.

Signed-off-by: Paul E. McKenney paul...@linux.vnet.ibm.com
---
 include/trace/events/rcu.h |6 --
 kernel/rcutree.c   |6 ++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/include/trace/events/rcu.h b/include/trace/events/rcu.h
index d4f559b..5678114 100644
--- a/include/trace/events/rcu.h
+++ b/include/trace/events/rcu.h
@@ -44,8 +44,10 @@ TRACE_EVENT(rcu_utilization,
  * of a new grace period or the end of an old grace period (cpustart
  * and cpuend, respectively), a CPU passing through a quiescent
  * state (cpuqs), a CPU coming online or going offline (cpuonl
- * and cpuofl, respectively), and a CPU being kicked for being too
- * long in dyntick-idle mode (kick).
+ * and cpuofl, respectively), a CPU being kicked for being too
+ * long in dyntick-idle mode (kick), a CPU accelerating its new
+ * callbacks to RCU_NEXT_READY_TAIL (AccReadyCB), and a CPU
+ * accelerating its new callbacks to RCU_WAIT_TAIL (AccWaitCB).
  */
 TRACE_EVENT(rcu_grace_period,
 
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index ac6a75d..e9dce4f 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,
rdp-nxttail[i] = rdp-nxttail[RCU_NEXT_TAIL];
rdp-nxtcompleted[i] = c;
}
+
+   /* Trace depending on how much we were able to accelerate. */
+   if (!*rdp-nxttail[RCU_WAIT_TAIL])
+   trace_rcu_grace_period(rsp-name, rdp-gpnum, AccWaitCB);
+   else
+   trace_rcu_grace_period(rsp-name, rdp-gpnum, AccReadyCB);
 }
 
 /*
-- 
1.7.8

--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/