From: Joel Fernandes <joel@joelfernandes.org>
To: linux-kernel@vger.kernel.org
Cc: kernel-team@android.com,
"Joel Fernandes (Google)" <joel@joelfernandes.org>,
Byungchul Park <byungchul.park@lge.com>,
Josh Triplett <josh@joshtriplett.org>,
Lai Jiangshan <jiangshanlai@gmail.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
peterz@infradead.org, Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH v2 3/3] rcutorture: Fix rcu_barrier successes counter
Date: Tue, 19 Jun 2018 15:14:19 -0700 [thread overview]
Message-ID: <20180619221419.41340-3-joel@joelfernandes.org> (raw)
In-Reply-To: <20180619221419.41340-1-joel@joelfernandes.org>
From: "Joel Fernandes (Google)" <joel@joelfernandes.org>
rcutorture currently increments both successes and error for barrier
test incase of errors. It should only increment the error counter incase
of errors so make it do so.
Test: Introduced rcu_barrier errors by returning from the barrier
callback without incrementing the callback counter.
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
---
kernel/rcu/rcutorture.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 2d1af5ffe536..b77012135ec0 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -169,7 +169,7 @@ static long n_rcu_torture_boost_failure;
static long n_rcu_torture_boosts;
static atomic_long_t n_rcu_torture_timers;
static long n_barrier_attempts;
-static long n_barrier_successes;
+static long n_barrier_successes; /* did rcu_barrier test succeed? */
static atomic_long_t n_cbfloods;
static struct list_head rcu_torture_removed;
@@ -1722,8 +1722,9 @@ static int rcu_torture_barrier(void *arg)
atomic_read(&barrier_cbs_invoked),
n_barrier_cbs);
WARN_ON_ONCE(1);
+ } else {
+ n_barrier_successes++;
}
- n_barrier_successes++;
schedule_timeout_interruptible(HZ / 10);
} while (!torture_must_stop());
torture_kthread_stopping("rcu_torture_barrier");
--
2.18.0.rc1.244.gcf134e6275-goog
next prev parent reply other threads:[~2018-06-19 22:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 22:14 [PATCH v2 1/3] rcu: Assign higher prio to RCU threads if rcutorture is built-in Joel Fernandes
2018-06-19 22:14 ` [PATCH v2 2/3] rcutorture: Add support to detect if boost kthread prio is too low Joel Fernandes
2018-06-19 22:14 ` Joel Fernandes [this message]
2018-06-20 17:10 ` [PATCH v2 1/3] rcu: Assign higher prio to RCU threads if rcutorture is built-in Paul E. McKenney
2018-06-21 0:25 ` Joel Fernandes
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=20180619221419.41340-3-joel@joelfernandes.org \
--to=joel@joelfernandes.org \
--cc=byungchul.park@lge.com \
--cc=jiangshanlai@gmail.com \
--cc=josh@joshtriplett.org \
--cc=kernel-team@android.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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 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®