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, dhowells@redhat.com, edumazet@google.com,
darren@dvhart.com, fweisbec@gmail.com, sbw@mit.edu,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Sedat Dilek <sedat.dilek@gmail.com>,
Davidlohr Bueso <davidlohr.bueso@hp.com>,
Rik van Riel <riel@surriel.com>,
Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH tip/core/rcu 1/5] rcu: Add duplicate-callback tests to rcutorture
Date: Sat, 17 Aug 2013 19:54:20 -0700 [thread overview]
Message-ID: <20130818025420.GC28923@leaf> (raw)
In-Reply-To: <1376792717-3755-1-git-send-email-paulmck@linux.vnet.ibm.com>
On Sat, Aug 17, 2013 at 07:25:13PM -0700, Paul E. McKenney wrote:
> From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
>
> This commit adds a object_debug option to rcutorture to allow the
> debug-object-based checks for duplicate call_rcu() invocations to
> be deterministically tested.
>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Cc: Sedat Dilek <sedat.dilek@gmail.com>
> Cc: Davidlohr Bueso <davidlohr.bueso@hp.com>
> Cc: Rik van Riel <riel@surriel.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Linus Torvalds <torvalds@linux-foundation.org>
> Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Two comments below; with those fixed,
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
> ---
> @@ -100,6 +101,8 @@ module_param(fqs_stutter, int, 0444);
> MODULE_PARM_DESC(fqs_stutter, "Wait time between fqs bursts (s)");
> module_param(n_barrier_cbs, int, 0444);
> MODULE_PARM_DESC(n_barrier_cbs, "# of callbacks/kthreads for barrier testing");
> +module_param(object_debug, int, 0444);
> +MODULE_PARM_DESC(object_debug, "Enable debug-object double call_rcu() testing");
modules-next has a change to ignore and warn about
unknown module parameters. Thus, I'd suggest wrapping the ifdef around
this module parameter, so it doesn't exist at all without
CONFIG_DEBUG_OBJECTS_RCU_HEAD.
Alternatively, consider providing the test unconditionally, and just
printing a big warning message saying that it's going to cause
corruption in the !CONFIG_DEBUG_OBJECTS_RCU_HEAD case.
> @@ -2163,6 +2178,28 @@ rcu_torture_init(void)
> firsterr = retval;
> goto unwind;
> }
> + if (object_debug) {
> +#ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD
> + struct rcu_head rh1;
> + struct rcu_head rh2;
> +
> + init_rcu_head_on_stack(&rh1);
> + init_rcu_head_on_stack(&rh2);
> + pr_alert("rcutorture: WARN: Duplicate call_rcu() test starting.\n");
> + local_irq_disable(); /* Make it hard to finish grace period. */
> + call_rcu(&rh1, rcu_torture_leak_cb); /* start grace period. */
> + call_rcu(&rh2, rcu_torture_err_cb);
> + call_rcu(&rh2, rcu_torture_err_cb); /* duplicate callback. */
> + local_irq_enable();
> + rcu_barrier();
> + pr_alert("rcutorture: WARN: Duplicate call_rcu() test complete.\n");
> + destroy_rcu_head_on_stack(&rh1);
> + destroy_rcu_head_on_stack(&rh2);
> +#else /* #ifdef CONFIG_DEBUG_OBJECTS_RCU_HEAD */
> + pr_alert("rcutorture: !%s, not testing duplicate call_rcu()\n",
> + "CONFIG_DEBUG_OBJECTS_RCU_HEAD");
Why put this parameter in a separate string? That makes it harder to
grep for the full error message. (That's assuming you keep the error
message, given the comment above.)
- Josh Triplett
next prev parent reply other threads:[~2013-08-18 2:54 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-18 2:24 [PATCH tip/core/rcu 0/5] rcutorture updates for 3.12 Paul E. McKenney
2013-08-18 2:25 ` [PATCH tip/core/rcu 1/5] rcu: Add duplicate-callback tests to rcutorture Paul E. McKenney
2013-08-18 2:25 ` [PATCH tip/core/rcu 2/5] rcu: Increase rcutorture test coverage Paul E. McKenney
2013-08-18 2:25 ` [PATCH tip/core/rcu 3/5] rcu: Sort rcutorture module parameters Paul E. McKenney
2013-08-18 2:57 ` Josh Triplett
2013-08-19 4:03 ` Paul E. McKenney
2013-08-18 2:25 ` [PATCH tip/core/rcu 4/5] rcu: Remove unused variable from rcu_torture_writer() Paul E. McKenney
2013-08-18 2:25 ` [PATCH tip/core/rcu 5/5] rcu: Make rcutorture emit online failures if verbose Paul E. McKenney
2013-08-18 2:59 ` Josh Triplett
2013-08-19 4:05 ` Paul E. McKenney
2013-08-18 2:54 ` Josh Triplett [this message]
2013-08-19 3:55 ` [PATCH tip/core/rcu 1/5] rcu: Add duplicate-callback tests to rcutorture Paul E. McKenney
2013-08-19 4:19 ` Josh Triplett
2013-08-19 16:09 ` Paul E. McKenney
2013-08-19 17:16 ` Josh Triplett
2013-08-20 2:05 ` Paul E. McKenney
2013-08-20 3:20 ` Josh Triplett
2013-08-18 2:59 ` [PATCH tip/core/rcu 0/5] rcutorture updates for 3.12 Josh Triplett
2013-08-20 2:51 ` [PATCH tip/core/rcu 1/5] rcu: Add duplicate-callback tests to rcutorture Paul E. McKenney
2013-08-20 2:51 ` [PATCH tip/core/rcu 2/5] rcu: Increase rcutorture test coverage Paul E. McKenney
2013-08-20 2:51 ` [PATCH tip/core/rcu 3/5] rcu: Sort rcutorture module parameters Paul E. McKenney
2013-08-20 2:51 ` [PATCH tip/core/rcu 4/5] rcu: Remove unused variable from rcu_torture_writer() Paul E. McKenney
2013-08-20 2:51 ` [PATCH tip/core/rcu 5/5] rcu: Make rcutorture emit online failures if verbose Paul E. McKenney
2013-08-20 3:24 ` [PATCH tip/core/rcu 1/5] rcu: Add duplicate-callback tests to rcutorture Josh Triplett
2013-08-20 10:02 ` Lai Jiangshan
2013-08-20 18:38 ` Paul E. McKenney
2013-08-21 2:40 ` Lai Jiangshan
2013-08-21 3:03 ` Paul E. McKenney
2013-08-24 19:25 ` Mathieu Desnoyers
2013-08-25 19:34 ` 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=20130818025420.GC28923@leaf \
--to=josh@joshtriplett.org \
--cc=akpm@linux-foundation.org \
--cc=darren@dvhart.com \
--cc=davidlohr.bueso@hp.com \
--cc=dhowells@redhat.com \
--cc=dipankar@in.ibm.com \
--cc=edumazet@google.com \
--cc=fweisbec@gmail.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=mingo@elte.hu \
--cc=niv@us.ibm.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=riel@surriel.com \
--cc=rostedt@goodmis.org \
--cc=sbw@mit.edu \
--cc=sedat.dilek@gmail.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.