Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1695212
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH tip/core/rcu 02/13] rcutorture: Print SRCU lock/unlock totals |
| Date | 2017-07-25 00:30 +0200 |
| Message-ID | <u6U1u-2LB-73@gated-at.bofh.it> (permalink) |
| References | <u6U1r-2LB-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
This commit adds printing of SRCU lock/unlock totals, which are just
the sums of the per-CPU counts. Saves a bit of mental arithmetic.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
kernel/rcu/srcutree.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/kernel/rcu/srcutree.c b/kernel/rcu/srcutree.c
index 8f6fd11c338a..b4f491b06ee0 100644
--- a/kernel/rcu/srcutree.c
+++ b/kernel/rcu/srcutree.c
@@ -1221,6 +1221,7 @@ void srcu_torture_stats_print(struct srcu_struct *sp, char *tt, char *tf)
{
int cpu;
int idx;
+ unsigned long s0 = 0, s1 = 0;
idx = sp->srcu_idx & 0x1;
pr_alert("%s%s Tree SRCU per-CPU(idx=%d):", tt, tf, idx);
@@ -1246,8 +1247,10 @@ void srcu_torture_stats_print(struct srcu_struct *sp, char *tt, char *tf)
c0 = l0 - u0;
c1 = l1 - u1;
pr_cont(" %d(%ld,%ld)", cpu, c0, c1);
+ s0 += c0;
+ s1 += c1;
}
- pr_cont("\n");
+ pr_cont(" T(%ld,%ld)\n", s0, s1);
}
EXPORT_SYMBOL_GPL(srcu_torture_stats_print);
--
2.5.2
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH tip/core/rcu 0/13] Torture-test updates "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-25 00:30 +0200 [PATCH tip/core/rcu 09/13] rcutorture: Use nr_cpus rather than maxcpus to limit test size "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-25 00:30 +0200 [PATCH tip/core/rcu 11/13] rcutorture: Eliminate unused ts_rem local from rcu_trace_clock_local() "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-25 00:30 +0200 [PATCH tip/core/rcu 12/13] rcu: Add last-CPU to GP-kthread starvation messages "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-25 00:30 +0200 [PATCH tip/core/rcu 13/13] rcutorture: Invoke call_rcu() from timer handler "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-25 00:30 +0200 [PATCH tip/core/rcu 06/13] rcutorture: Don't wait for kernel when all builds fail "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-25 00:30 +0200 [PATCH tip/core/rcu 05/13] torture: Add --kconfig argument to kvm.sh "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-25 00:30 +0200 [PATCH tip/core/rcu 07/13] rcutorture: Enable SRCU readers from timer handler "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-25 00:30 +0200 [PATCH tip/core/rcu 01/13] rcutorture: Move SRCU status printing to SRCU implementations "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-25 00:30 +0200 [PATCH tip/core/rcu 08/13] rcutorture: Place event-traced strings into trace buffer "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-25 00:30 +0200 [PATCH tip/core/rcu 02/13] rcutorture: Print SRCU lock/unlock totals "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-07-25 00:30 +0200
csiph-web