From: Josh Triplett <josh@joshtriplett.org>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
laijs@cn.fujitsu.com, dipankar@in.ibm.com,
akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca,
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
Subject: Re: [PATCH tip/core/rcu 3/6] rcu: Test srcu_barrier() from rcutorture test suite
Date: Fri, 15 Jun 2012 13:25:11 -0700 [thread overview]
Message-ID: <20120615202511.GC31184@leaf> (raw)
In-Reply-To: <1339786674-25265-3-git-send-email-paulmck@linux.vnet.ibm.com>
On Fri, Jun 15, 2012 at 11:57:51AM -0700, Paul E. McKenney wrote:
> 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>
This commit message suggests that the commit only adds support for
testing srcu_barrier, but it adds both call_srcu and srcu_barrier. You
might want to wordsmith it a bit:
SRCU now has a call_srcu() and an srcu_barrier(), but rcutorture does
not test them. This commit adds the machinery to allow rcutorture's
existing tests for call_rcu() and rcu_barrier() to apply to the SRCU
equivalents.
With that change:
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> ---
> 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 20:25 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 ` [PATCH tip/core/rcu 3/6] rcu: Test srcu_barrier() from rcutorture test suite Paul E. McKenney
2012-06-15 20:25 ` Josh Triplett [this message]
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=20120615202511.GC31184@leaf \
--to=josh@joshtriplett.org \
--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=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=paulmck@linux.vnet.ibm.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