diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-08-15 13:12:12 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-09-23 12:18:14 -0400 |
commit | 756cbf6befe6f59b0b3e0967d92a66c11e2566ed (patch) | |
tree | 208a54ccf6ed2003fe8020901a6a9515dd5a3273 | |
parent | 9261dd0da6c6432f08670719069449c6efe4f7a9 (diff) |
rcu: Distinguish between NOCB and non-NOCB rcu_callback trace events
One way to distinguish between NOCB and non-NOCB rcu_callback trace
events is that the former always print zero for the lazy and non-lazy
queue lengths. Unfortunately, this also means that we cannot see the NOCB
queue lengths. This commit therefore accesses the NOCB queue lengths,
but negates them. NOCB rcu_callback trace events should therefore have
negative queue lengths.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
[ paulmck: Match operand size per kbuild test robot's advice. ]
-rw-r--r-- | kernel/rcutree_plugin.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/rcutree_plugin.h b/kernel/rcutree_plugin.h index f4ed24b18e77..24b01b69be92 100644 --- a/kernel/rcutree_plugin.h +++ b/kernel/rcutree_plugin.h | |||
@@ -2147,10 +2147,12 @@ static bool __call_rcu_nocb(struct rcu_data *rdp, struct rcu_head *rhp, | |||
2147 | if (__is_kfree_rcu_offset((unsigned long)rhp->func)) | 2147 | if (__is_kfree_rcu_offset((unsigned long)rhp->func)) |
2148 | trace_rcu_kfree_callback(rdp->rsp->name, rhp, | 2148 | trace_rcu_kfree_callback(rdp->rsp->name, rhp, |
2149 | (unsigned long)rhp->func, | 2149 | (unsigned long)rhp->func, |
2150 | rdp->qlen_lazy, rdp->qlen); | 2150 | -atomic_long_read(&rdp->nocb_q_count_lazy), |
2151 | -atomic_long_read(&rdp->nocb_q_count)); | ||
2151 | else | 2152 | else |
2152 | trace_rcu_callback(rdp->rsp->name, rhp, | 2153 | trace_rcu_callback(rdp->rsp->name, rhp, |
2153 | rdp->qlen_lazy, rdp->qlen); | 2154 | -atomic_long_read(&rdp->nocb_q_count_lazy), |
2155 | -atomic_long_read(&rdp->nocb_q_count)); | ||
2154 | return 1; | 2156 | return 1; |
2155 | } | 2157 | } |
2156 | 2158 | ||