mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@kernel.org, jiangshanlai@gmail.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, tglx@linutronix.de, peterz@infradead.org,
	rostedt@goodmis.org, dhowells@redhat.com, edumazet@google.com,
	dvhart@linux.intel.com, fweisbec@gmail.com, oleg@redhat.com,
	bobby.prani@gmail.com,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH tip/core/rcu 03/24] rcutorture: Expedited-GP batch progress access to torturing
Date: Tue, 12 Apr 2016 08:43:36 -0700	[thread overview]
Message-ID: <1460475837-26498-3-git-send-email-paulmck@linux.vnet.ibm.com> (raw)
In-Reply-To: <20160412154332.GA24983@linux.vnet.ibm.com>

This commit provides rcu_exp_batches_completed() and
rcu_exp_batches_completed_sched() functions to allow torture-test modules
to check how many expedited grace period batches have completed.
These are analogous to the existing rcu_batches_completed(),
rcu_batches_completed_bh(), and rcu_batches_completed_sched() functions.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 include/linux/rcutiny.h | 16 ++++++++++++++++
 include/linux/rcutree.h |  2 ++
 kernel/rcu/tree.c       | 22 ++++++++++++++++++++++
 3 files changed, 40 insertions(+)

diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index 64809aea661c..93aea75029fb 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -149,6 +149,22 @@ static inline unsigned long rcu_batches_completed_sched(void)
 	return 0;
 }
 
+/*
+ * Return the number of expedited grace periods completed.
+ */
+static inline unsigned long rcu_exp_batches_completed(void)
+{
+	return 0;
+}
+
+/*
+ * Return the number of expedited sched grace periods completed.
+ */
+static inline unsigned long rcu_exp_batches_completed_sched(void)
+{
+	return 0;
+}
+
 static inline void rcu_force_quiescent_state(void)
 {
 }
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index ad1eda9fa4da..5043cb823fb2 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -87,6 +87,8 @@ unsigned long rcu_batches_started_sched(void);
 unsigned long rcu_batches_completed(void);
 unsigned long rcu_batches_completed_bh(void);
 unsigned long rcu_batches_completed_sched(void);
+unsigned long rcu_exp_batches_completed(void);
+unsigned long rcu_exp_batches_completed_sched(void);
 void show_rcu_gp_kthreads(void);
 
 void rcu_force_quiescent_state(void);
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index 531a328076bd..88df64087dfe 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -460,6 +460,28 @@ unsigned long rcu_batches_completed_bh(void)
 EXPORT_SYMBOL_GPL(rcu_batches_completed_bh);
 
 /*
+ * Return the number of RCU expedited batches completed thus far for
+ * debug & stats.  Odd numbers mean that a batch is in progress, even
+ * numbers mean idle.  The value returned will thus be roughly double
+ * the cumulative batches since boot.
+ */
+unsigned long rcu_exp_batches_completed(void)
+{
+	return rcu_state_p->expedited_sequence;
+}
+EXPORT_SYMBOL_GPL(rcu_exp_batches_completed);
+
+/*
+ * Return the number of RCU-sched expedited batches completed thus far
+ * for debug & stats.  Similar to rcu_exp_batches_completed().
+ */
+unsigned long rcu_exp_batches_completed_sched(void)
+{
+	return rcu_sched_state.expedited_sequence;
+}
+EXPORT_SYMBOL_GPL(rcu_exp_batches_completed_sched);
+
+/*
  * Force a quiescent state.
  */
 void rcu_force_quiescent_state(void)
-- 
2.5.2

  parent reply	other threads:[~2016-04-12 15:50 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-12 15:43 [PATCH tip/core/rcu 0/24] Torture-test changes for 4.7 Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 01/24] rcutorture: Update scripting to accommodate rcuperf Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 02/24] rcutorture: Allow for rcupdate.rcu_normal Paul E. McKenney
2016-04-12 15:43 ` Paul E. McKenney [this message]
2016-04-12 15:43 ` [PATCH tip/core/rcu 04/24] rcutorture: Add RCU grace-period performance tests Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 05/24] rcutorture: Documentation for rcuperf kernel parameters Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 06/24] rcutorture: Bind rcuperf reader/writer kthreads to CPUs Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 07/24] rcutorture: Set rcuperf writer kthreads to real-time priority Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 08/24] rcutorture: Print measure of batching efficiency Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 09/24] rcutorture: Make rcuperf collect expedited event-trace data Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 10/24] rcutorture: Make scripts analyze rcuperf trace data, if present Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 11/24] rcutorture: Add rcuperf holdoff boot parameter to reduce interference Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 12/24] rcutorture: Avoid RCU CPU stall warning and RT throttling Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 13/24] rcutorture: Add largish-system rcuperf scenario Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 14/24] rcuperf: Do not wake up shutdown wait queue if "shutdown" is false Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 15/24] rcutorture: Remove redundant initialization to zero Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 16/24] rcutorture: Consider FROZEN hotplug notifier transitions Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 17/24] torture: Clarify refusal to run more than one torture test Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 18/24] torture: Kill qemu, not parent process Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 19/24] rcutorture: Convert test duration to seconds early Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 20/24] rcutorture: Add OS-jitter capability Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 21/24] rcutorture: Don't rebuild identical kernel Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 22/24] rcutorture: Dump trace buffer upon shutdown Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 23/24] rcutorture: Add irqs-disabled test for call_rcu() Paul E. McKenney
2016-04-12 15:43 ` [PATCH tip/core/rcu 24/24] rcutorture: Add boot-time adjustment of leaf fanout Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1460475837-26498-3-git-send-email-paulmck@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=bobby.prani@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=dvhart@linux.intel.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®