From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: linux-kernel@vger.kernel.org
Cc: mingo@elte.hu, laijs@cn.fujitsu.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca,
josh@joshtriplett.org, niv@us.ibm.com, tglx@linutronix.de,
peterz@infradead.org, rostedt@goodmis.org,
Valdis.Kletnieks@vt.edu, dhowells@redhat.com,
eric.dumazet@gmail.com, darren@dvhart.com, fweisbec@gmail.com,
patches@linaro.org,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: [PATCH tip/core/rcu 3/6] rcu: Test srcu_barrier() from rcutorture test suite
Date: Fri, 15 Jun 2012 11:57:51 -0700 [thread overview]
Message-ID: <1339786674-25265-3-git-send-email-paulmck@linux.vnet.ibm.com> (raw)
In-Reply-To: <1339786674-25265-1-git-send-email-paulmck@linux.vnet.ibm.com>
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
SRCU now has a call_srcu() and an srcu_barrier(), but rcutorture does
not test srcu_barrier(). This commit adds the machinery to allow
rcutorture's existing rcu_barrier() tests to apply to SRCU.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
kernel/rcutorture.c | 15 +++++++++++++--
1 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/kernel/rcutorture.c b/kernel/rcutorture.c
index 9850479..7b6935e 100644
--- a/kernel/rcutorture.c
+++ b/kernel/rcutorture.c
@@ -635,6 +635,17 @@ static void srcu_torture_synchronize(void)
synchronize_srcu(&srcu_ctl);
}
+static void srcu_torture_call(struct rcu_head *head,
+ void (*func)(struct rcu_head *head))
+{
+ call_srcu(&srcu_ctl, head, func);
+}
+
+static void srcu_torture_barrier(void)
+{
+ srcu_barrier(&srcu_ctl);
+}
+
static int srcu_torture_stats(char *page)
{
int cnt = 0;
@@ -661,8 +672,8 @@ static struct rcu_torture_ops srcu_ops = {
.completed = srcu_torture_completed,
.deferred_free = srcu_torture_deferred_free,
.sync = srcu_torture_synchronize,
- .call = NULL,
- .cb_barrier = NULL,
+ .call = srcu_torture_call,
+ .cb_barrier = srcu_torture_barrier,
.stats = srcu_torture_stats,
.name = "srcu"
};
--
1.7.8
next prev parent reply other threads:[~2012-06-15 18:59 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-15 18:57 [PATCH tip/core/rcu 0/6] rcutorture and documentation patches for 3.6 Paul E. McKenney
2012-06-15 18:57 ` [PATCH tip/core/rcu 1/6] rcu: Update documentation to cover call_srcu() and srcu_barrier() Paul E. McKenney
2012-06-15 18:57 ` [PATCH tip/core/rcu 2/6] rcu: Rationalize ordering of torture_ops list Paul E. McKenney
2012-06-15 20:21 ` Josh Triplett
2012-06-15 18:57 ` Paul E. McKenney [this message]
2012-06-15 20:25 ` [PATCH tip/core/rcu 3/6] rcu: Test srcu_barrier() from rcutorture test suite Josh Triplett
2012-06-15 18:57 ` [PATCH tip/core/rcu 4/6] rcu: Fix bug in rcu_barrier() torture test Paul E. McKenney
2012-06-15 19:44 ` Mathieu Desnoyers
2012-06-15 20:16 ` Paul E. McKenney
2012-06-15 18:57 ` [PATCH tip/core/rcu 5/6] rcu: Fix diagnostic-printk typo in rcutorture Paul E. McKenney
2012-06-15 20:30 ` Josh Triplett
2012-06-15 18:57 ` [PATCH tip/core/rcu 6/6] rcu: Make rcutorture fakewriters invoke rcu_barrier() Paul E. McKenney
2012-06-15 20:37 ` Josh Triplett
2012-06-15 21:19 ` Paul E. McKenney
2012-06-15 21:52 ` Josh Triplett
2012-06-15 23:48 ` Paul E. McKenney
2012-06-15 20:19 ` [PATCH tip/core/rcu 1/6] rcu: Update documentation to cover call_srcu() and srcu_barrier() Josh Triplett
2012-06-15 21:16 ` 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=1339786674-25265-3-git-send-email-paulmck@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@linux-foundation.org \
--cc=darren@dvhart.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=eric.dumazet@gmail.com \
--cc=fweisbec@gmail.com \
--cc=josh@joshtriplett.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=niv@us.ibm.com \
--cc=patches@linaro.org \
--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®