* [PATCH tip/core/rcu 0/12] rcutorture changes for 3.20
@ 2015-01-07 18:19 Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows Paul E. McKenney
0 siblings, 1 reply; 13+ messages in thread
From: Paul E. McKenney @ 2015-01-07 18:19 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
bobby.prani
Hello!
This series contains rcutorture updates for 3.20:
1. Issue warnings on close calls due to Reader Batch blows.
This diagnostic would have spotted the ugly preemptible-RCU
CPU-hotplug bug some years back.
2. Make _batches_completed() functions return unsigned long to
avoid signed overflow issues.
3. Make build-output parsing correctly flag RCU's warnings.
These needed to be updated when the "rcu" directory was created
in "kernel."
4. Use unsigned long for Reader Batch computations, avoiding
signed overflow.
5. Provide rcu_batches_completed_sched() for TINY_RCU for new
rcutorture compatibility.
6. Drop rcu_torture_completed() and friends. Now that the types
match, the wrappers aren't needed.
7. Remove redundant rcu_batches_completed() declaration.
8. Check from beginning to end of grace period instead of from
end of previous grace period to end of next one. This makes
rcutorture more sensitive to RCU bugs that make the grace
period too short.
9. Handle different mpstat versions -- new versions added fields.
10. torture: Add "-enable-kvm -soundhw pcspk" to qemu command line,
as newer versions of qemu complain if they are missing.
11. Flag console.log file to prevent holdovers from earlier runs,
which could make a run look successful when it didn't even get
to the point of starting qemu.
12. Add more diagnostics in rcu_barrier() test failure case.
Thanx, Paul
------------------------------------------------------------------------
b/include/linux/rcutiny.h | 42 ++++++
b/include/linux/rcutree.h | 9 -
b/kernel/rcu/rcutorture.c | 74 ++++++------
b/kernel/rcu/tree.c | 44 ++++++-
b/kernel/rcu/tree.h | 3
b/kernel/rcu/tree_plugin.h | 34 -----
b/tools/testing/selftests/rcutorture/bin/cpus2use.sh | 2
b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh | 18 ++
b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 9 -
b/tools/testing/selftests/rcutorture/bin/parse-build.sh | 20 ++-
10 files changed, 166 insertions(+), 89 deletions(-)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows
2015-01-07 18:19 [PATCH tip/core/rcu 0/12] rcutorture changes for 3.20 Paul E. McKenney
@ 2015-01-07 18:19 ` Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 02/12] rcu: Make _batches_completed() functions return unsigned long Paul E. McKenney
` (10 more replies)
0 siblings, 11 replies; 13+ messages in thread
From: Paul E. McKenney @ 2015-01-07 18:19 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
bobby.prani, Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Normal rcutorture checking overestimates grace periods somewhat due to
the fact that there is a delay from a grace-period request until the
start of the corresponding grace period and another delay from the end
of that grace period to notification of the requestor. This means that
rcutorture's detection of RCU bugs is less sensitive than it might be.
It turns out that rcutorture also checks the underlying grace-period
"completed" counter (displayed in Reader Batch output), which in theory
allows rcutorture to do exact checks. In practice, memory misordering
(by both compiler and CPU) can result in false positives. However,
experience on x86 shows that these false positives are quite rare,
occuring less than one time per 1,000 hours of testing. This commit
therefore does the exact checking, giving a warning if any Reader Batch
blows happen, and flagging an error if they happen more often than
once every three hours in long tests.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
.../selftests/rcutorture/bin/kvm-recheck-rcu.sh | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh
index d6cc07fc137f..559e01ac86be 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh
@@ -30,6 +30,7 @@ else
echo Unreadable results directory: $i
exit 1
fi
+. tools/testing/selftests/rcutorture/bin/functions.sh
configfile=`echo $i | sed -e 's/^.*\///'`
ngps=`grep ver: $i/console.log 2> /dev/null | tail -1 | sed -e 's/^.* ver: //' -e 's/ .*$//'`
@@ -48,4 +49,21 @@ else
title="$title ($ngpsps per second)"
fi
echo $title
+ nclosecalls=`grep --binary-files=text 'torture: Reader Batch' $i/console.log | tail -1 | awk '{for (i=NF-8;i<=NF;i++) sum+=$i; } END {print sum}'`
+ if test -z "$nclosecalls"
+ then
+ exit 0
+ fi
+ if test "$nclosecalls" -eq 0
+ then
+ exit 0
+ fi
+ # Compute number of close calls per tenth of an hour
+ nclosecalls10=`awk -v nclosecalls=$nclosecalls -v dur=$dur 'BEGIN { print int(nclosecalls * 36000 / dur) }' < /dev/null`
+ if test $nclosecalls10 -gt 5 -a $nclosecalls -gt 1
+ then
+ print_bug $nclosecalls "Reader Batch close calls in" $(($dur/60)) minute run: $i
+ else
+ print_warning $nclosecalls "Reader Batch close calls in" $(($dur/60)) minute run: $i
+ fi
fi
--
1.8.1.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH tip/core/rcu 02/12] rcu: Make _batches_completed() functions return unsigned long
2015-01-07 18:19 ` [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows Paul E. McKenney
@ 2015-01-07 18:19 ` Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 03/12] rcutorture: Make build-output parsing correctly flag RCU's warnings Paul E. McKenney
` (9 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Paul E. McKenney @ 2015-01-07 18:19 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
bobby.prani, Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Long ago, the various ->completed fields were of type long, but now are
unsigned long due to signed-integer-overflow concerns. However, the
various _batches_completed() functions remained of type long, even though
their only purpose in life is to return the corresponding ->completed
field. This patch cleans this up by changing these functions' return
types to unsigned long.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
include/linux/rcutiny.h | 4 ++--
include/linux/rcutree.h | 6 +++---
kernel/rcu/tree.c | 4 ++--
kernel/rcu/tree.h | 2 +-
kernel/rcu/tree_plugin.h | 6 +++---
5 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index 0e5366200154..91f7e4c37800 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -94,7 +94,7 @@ static inline void rcu_virt_note_context_switch(int cpu)
/*
* Return the number of grace periods.
*/
-static inline long rcu_batches_completed(void)
+static inline unsigned long rcu_batches_completed(void)
{
return 0;
}
@@ -102,7 +102,7 @@ static inline long rcu_batches_completed(void)
/*
* Return the number of bottom-half grace periods.
*/
-static inline long rcu_batches_completed_bh(void)
+static inline unsigned long rcu_batches_completed_bh(void)
{
return 0;
}
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 52953790dcca..9885bfb6b123 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -81,9 +81,9 @@ void cond_synchronize_rcu(unsigned long oldstate);
extern unsigned long rcutorture_testseq;
extern unsigned long rcutorture_vernum;
-long rcu_batches_completed(void);
-long rcu_batches_completed_bh(void);
-long rcu_batches_completed_sched(void);
+unsigned long rcu_batches_completed(void);
+unsigned long rcu_batches_completed_bh(void);
+unsigned long rcu_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 4c106fcc0d54..e26d78712e16 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -317,7 +317,7 @@ static int rcu_pending(void);
/*
* Return the number of RCU-sched batches processed thus far for debug & stats.
*/
-long rcu_batches_completed_sched(void)
+unsigned long rcu_batches_completed_sched(void)
{
return rcu_sched_state.completed;
}
@@ -326,7 +326,7 @@ EXPORT_SYMBOL_GPL(rcu_batches_completed_sched);
/*
* Return the number of RCU BH batches processed thus far for debug & stats.
*/
-long rcu_batches_completed_bh(void)
+unsigned long rcu_batches_completed_bh(void)
{
return rcu_bh_state.completed;
}
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index 8e7b1843896e..1a07d7379ac6 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -546,7 +546,7 @@ DECLARE_PER_CPU(char, rcu_cpu_has_work);
/* Forward declarations for rcutree_plugin.h */
static void rcu_bootup_announce(void);
-long rcu_batches_completed(void);
+unsigned long rcu_batches_completed(void);
static void rcu_preempt_note_context_switch(void);
static int rcu_preempt_blocked_readers_cgp(struct rcu_node *rnp);
#ifdef CONFIG_HOTPLUG_CPU
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index 3ec85cb5d544..f69300d4a51f 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -117,7 +117,7 @@ static void __init rcu_bootup_announce(void)
* Return the number of RCU-preempt batches processed thus far
* for debug and statistics.
*/
-static long rcu_batches_completed_preempt(void)
+static unsigned long rcu_batches_completed_preempt(void)
{
return rcu_preempt_state.completed;
}
@@ -126,7 +126,7 @@ EXPORT_SYMBOL_GPL(rcu_batches_completed_preempt);
/*
* Return the number of RCU batches processed thus far for debug & stats.
*/
-long rcu_batches_completed(void)
+unsigned long rcu_batches_completed(void)
{
return rcu_batches_completed_preempt();
}
@@ -935,7 +935,7 @@ static void __init rcu_bootup_announce(void)
/*
* Return the number of RCU batches processed thus far for debug & stats.
*/
-long rcu_batches_completed(void)
+unsigned long rcu_batches_completed(void)
{
return rcu_batches_completed_sched();
}
--
1.8.1.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH tip/core/rcu 03/12] rcutorture: Make build-output parsing correctly flag RCU's warnings
2015-01-07 18:19 ` [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 02/12] rcu: Make _batches_completed() functions return unsigned long Paul E. McKenney
@ 2015-01-07 18:19 ` Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 04/12] rcutorture: Use unsigned for Reader Batch computations Paul E. McKenney
` (8 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Paul E. McKenney @ 2015-01-07 18:19 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
bobby.prani, Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
.../testing/selftests/rcutorture/bin/parse-build.sh | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
diff --git a/tools/testing/selftests/rcutorture/bin/parse-build.sh b/tools/testing/selftests/rcutorture/bin/parse-build.sh
index 499d1e598e42..a6b57622c2e5 100755
--- a/tools/testing/selftests/rcutorture/bin/parse-build.sh
+++ b/tools/testing/selftests/rcutorture/bin/parse-build.sh
@@ -26,12 +26,15 @@
#
# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
-T=$1
+F=$1
title=$2
+T=/tmp/parse-build.sh.$$
+trap 'rm -rf $T' 0
+mkdir $T
. functions.sh
-if grep -q CC < $T
+if grep -q CC < $F
then
:
else
@@ -39,18 +42,21 @@ else
exit 1
fi
-if grep -q "error:" < $T
+if grep -q "error:" < $F
then
print_bug $title build errors:
- grep "error:" < $T
+ grep "error:" < $F
exit 2
fi
-exit 0
-if egrep -q "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T
+grep warning: < $F > $T/warnings
+grep "include/linux/*rcu*\.h:" $T/warnings > $T/hwarnings
+grep "kernel/rcu/[^/]*:" $T/warnings > $T/cwarnings
+cat $T/hwarnings $T/cwarnings > $T/rcuwarnings
+if test -s $T/rcuwarnings
then
print_warning $title build errors:
- egrep "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T
+ cat $T/rcuwarnings
exit 2
fi
exit 0
--
1.8.1.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH tip/core/rcu 04/12] rcutorture: Use unsigned for Reader Batch computations
2015-01-07 18:19 ` [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 02/12] rcu: Make _batches_completed() functions return unsigned long Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 03/12] rcutorture: Make build-output parsing correctly flag RCU's warnings Paul E. McKenney
@ 2015-01-07 18:19 ` Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 05/12] rcu: provide rcu_batches_completed_sched() for TINY_RCU Paul E. McKenney
` (7 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Paul E. McKenney @ 2015-01-07 18:19 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
bobby.prani, Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
The counter returned by the various ->completed functions is subject to
overflow, which means that subtracting two such counters might result
in overflow, which invokes undefined behavior in the C standard. This
commit therefore changes these functions and variables to unsigned to
avoid this undefined behavior.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
kernel/rcu/rcutorture.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 4d559baf06e0..f43e3517f5f5 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -244,7 +244,7 @@ struct rcu_torture_ops {
int (*readlock)(void);
void (*read_delay)(struct torture_random_state *rrsp);
void (*readunlock)(int idx);
- int (*completed)(void);
+ unsigned long (*completed)(void);
void (*deferred_free)(struct rcu_torture *p);
void (*sync)(void);
void (*exp_sync)(void);
@@ -296,7 +296,7 @@ static void rcu_torture_read_unlock(int idx) __releases(RCU)
rcu_read_unlock();
}
-static int rcu_torture_completed(void)
+static unsigned long rcu_torture_completed(void)
{
return rcu_batches_completed();
}
@@ -356,7 +356,7 @@ rcu_torture_cb(struct rcu_head *p)
cur_ops->deferred_free(rp);
}
-static int rcu_no_completed(void)
+static unsigned long rcu_no_completed(void)
{
return 0;
}
@@ -407,7 +407,7 @@ static void rcu_bh_torture_read_unlock(int idx) __releases(RCU_BH)
rcu_read_unlock_bh();
}
-static int rcu_bh_torture_completed(void)
+static unsigned long rcu_bh_torture_completed(void)
{
return rcu_batches_completed_bh();
}
@@ -510,7 +510,7 @@ static void srcu_torture_read_unlock(int idx) __releases(&srcu_ctl)
srcu_read_unlock(&srcu_ctl, idx);
}
-static int srcu_torture_completed(void)
+static unsigned long srcu_torture_completed(void)
{
return srcu_batches_completed(&srcu_ctl);
}
@@ -1015,8 +1015,8 @@ static void rcutorture_trace_dump(void)
static void rcu_torture_timer(unsigned long unused)
{
int idx;
- int completed;
- int completed_end;
+ unsigned long completed;
+ unsigned long completed_end;
static DEFINE_TORTURE_RANDOM(rand);
static DEFINE_SPINLOCK(rand_lock);
struct rcu_torture *p;
@@ -1073,8 +1073,8 @@ static void rcu_torture_timer(unsigned long unused)
static int
rcu_torture_reader(void *arg)
{
- int completed;
- int completed_end;
+ unsigned long completed;
+ unsigned long completed_end;
int idx;
DEFINE_TORTURE_RANDOM(rand);
struct rcu_torture *p;
--
1.8.1.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH tip/core/rcu 05/12] rcu: provide rcu_batches_completed_sched() for TINY_RCU
2015-01-07 18:19 ` [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows Paul E. McKenney
` (2 preceding siblings ...)
2015-01-07 18:19 ` [PATCH tip/core/rcu 04/12] rcutorture: Use unsigned for Reader Batch computations Paul E. McKenney
@ 2015-01-07 18:19 ` Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 06/12] rcutorture: Drop rcu_torture_completed() and friends Paul E. McKenney
` (6 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Paul E. McKenney @ 2015-01-07 18:19 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
bobby.prani, Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
A bug in rcutorture has caused it to ignore completed batches.
In preparation for fixing that bug, this commit provides TINY_RCU with
the required rcu_batches_completed_sched().
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
include/linux/rcutiny.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index 91f7e4c37800..1ce2d6b8f0c3 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -107,6 +107,14 @@ static inline unsigned long rcu_batches_completed_bh(void)
return 0;
}
+/*
+ * Return the number of sched grace periods.
+ */
+static inline unsigned long rcu_batches_completed_sched(void)
+{
+ return 0;
+}
+
static inline void rcu_force_quiescent_state(void)
{
}
--
1.8.1.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH tip/core/rcu 06/12] rcutorture: Drop rcu_torture_completed() and friends
2015-01-07 18:19 ` [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows Paul E. McKenney
` (3 preceding siblings ...)
2015-01-07 18:19 ` [PATCH tip/core/rcu 05/12] rcu: provide rcu_batches_completed_sched() for TINY_RCU Paul E. McKenney
@ 2015-01-07 18:19 ` Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 07/12] rcu: Remove redundant rcu_batches_completed() declaration Paul E. McKenney
` (5 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Paul E. McKenney @ 2015-01-07 18:19 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
bobby.prani, Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Now that the return type of rcu_batches_completed() and friends matches
that of the rcu_torture_ops structure's ->completed field, the wrapper
functions can be deleted. This commit carries out that deletion, while
also wiring "sched"'s ->completed field to rcu_batches_completed_sched().
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
kernel/rcu/rcutorture.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index f43e3517f5f5..aadbc072ccf4 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -296,11 +296,6 @@ static void rcu_torture_read_unlock(int idx) __releases(RCU)
rcu_read_unlock();
}
-static unsigned long rcu_torture_completed(void)
-{
- return rcu_batches_completed();
-}
-
/*
* Update callback in the pipe. This should be invoked after a grace period.
*/
@@ -377,7 +372,7 @@ static struct rcu_torture_ops rcu_ops = {
.readlock = rcu_torture_read_lock,
.read_delay = rcu_read_delay,
.readunlock = rcu_torture_read_unlock,
- .completed = rcu_torture_completed,
+ .completed = rcu_batches_completed,
.deferred_free = rcu_torture_deferred_free,
.sync = synchronize_rcu,
.exp_sync = synchronize_rcu_expedited,
@@ -407,11 +402,6 @@ static void rcu_bh_torture_read_unlock(int idx) __releases(RCU_BH)
rcu_read_unlock_bh();
}
-static unsigned long rcu_bh_torture_completed(void)
-{
- return rcu_batches_completed_bh();
-}
-
static void rcu_bh_torture_deferred_free(struct rcu_torture *p)
{
call_rcu_bh(&p->rtort_rcu, rcu_torture_cb);
@@ -423,7 +413,7 @@ static struct rcu_torture_ops rcu_bh_ops = {
.readlock = rcu_bh_torture_read_lock,
.read_delay = rcu_read_delay, /* just reuse rcu's version. */
.readunlock = rcu_bh_torture_read_unlock,
- .completed = rcu_bh_torture_completed,
+ .completed = rcu_batches_completed_bh,
.deferred_free = rcu_bh_torture_deferred_free,
.sync = synchronize_rcu_bh,
.exp_sync = synchronize_rcu_bh_expedited,
@@ -600,7 +590,7 @@ static struct rcu_torture_ops sched_ops = {
.readlock = sched_torture_read_lock,
.read_delay = rcu_read_delay, /* just reuse rcu's version. */
.readunlock = sched_torture_read_unlock,
- .completed = rcu_no_completed,
+ .completed = rcu_batches_completed_sched,
.deferred_free = rcu_sched_torture_deferred_free,
.sync = synchronize_sched,
.exp_sync = synchronize_sched_expedited,
--
1.8.1.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH tip/core/rcu 07/12] rcu: Remove redundant rcu_batches_completed() declaration
2015-01-07 18:19 ` [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows Paul E. McKenney
` (4 preceding siblings ...)
2015-01-07 18:19 ` [PATCH tip/core/rcu 06/12] rcutorture: Drop rcu_torture_completed() and friends Paul E. McKenney
@ 2015-01-07 18:19 ` Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 08/12] rcutorture: Check from beginning to end of grace period Paul E. McKenney
` (4 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Paul E. McKenney @ 2015-01-07 18:19 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
bobby.prani, Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
kernel/rcu/tree.h | 1 -
1 file changed, 1 deletion(-)
diff --git a/kernel/rcu/tree.h b/kernel/rcu/tree.h
index 1a07d7379ac6..69eb422445f9 100644
--- a/kernel/rcu/tree.h
+++ b/kernel/rcu/tree.h
@@ -546,7 +546,6 @@ DECLARE_PER_CPU(char, rcu_cpu_has_work);
/* Forward declarations for rcutree_plugin.h */
static void rcu_bootup_announce(void);
-unsigned long rcu_batches_completed(void);
static void rcu_preempt_note_context_switch(void);
static int rcu_preempt_blocked_readers_cgp(struct rcu_node *rnp);
#ifdef CONFIG_HOTPLUG_CPU
--
1.8.1.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH tip/core/rcu 08/12] rcutorture: Check from beginning to end of grace period
2015-01-07 18:19 ` [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows Paul E. McKenney
` (5 preceding siblings ...)
2015-01-07 18:19 ` [PATCH tip/core/rcu 07/12] rcu: Remove redundant rcu_batches_completed() declaration Paul E. McKenney
@ 2015-01-07 18:19 ` Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 09/12] rcutorture: Handle different mpstat versions Paul E. McKenney
` (3 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Paul E. McKenney @ 2015-01-07 18:19 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
bobby.prani, Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Currently, rcutorture's Reader Batch checks measure from the end of
the previous grace period to the end of the current one. This commit
tightens up these checks by measuring from the start and end of the same
grace period. This involves adding rcu_batches_started() and friends
corresponding to the existing rcu_batches_completed() and friends.
We leave SRCU alone for the moment, as it does not yet have a way of
tracking both ends of its grace periods.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
include/linux/rcutiny.h | 30 +++++++++++++++++++++++++++---
include/linux/rcutree.h | 3 +++
kernel/rcu/rcutorture.c | 37 +++++++++++++++++++++++++++----------
kernel/rcu/tree.c | 40 ++++++++++++++++++++++++++++++++++++++--
kernel/rcu/tree_plugin.h | 28 ----------------------------
5 files changed, 95 insertions(+), 43 deletions(-)
diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h
index 1ce2d6b8f0c3..984192160e9b 100644
--- a/include/linux/rcutiny.h
+++ b/include/linux/rcutiny.h
@@ -92,7 +92,31 @@ static inline void rcu_virt_note_context_switch(int cpu)
}
/*
- * Return the number of grace periods.
+ * Return the number of grace periods started.
+ */
+static inline unsigned long rcu_batches_started(void)
+{
+ return 0;
+}
+
+/*
+ * Return the number of bottom-half grace periods started.
+ */
+static inline unsigned long rcu_batches_started_bh(void)
+{
+ return 0;
+}
+
+/*
+ * Return the number of sched grace periods started.
+ */
+static inline unsigned long rcu_batches_started_sched(void)
+{
+ return 0;
+}
+
+/*
+ * Return the number of grace periods completed.
*/
static inline unsigned long rcu_batches_completed(void)
{
@@ -100,7 +124,7 @@ static inline unsigned long rcu_batches_completed(void)
}
/*
- * Return the number of bottom-half grace periods.
+ * Return the number of bottom-half grace periods completed.
*/
static inline unsigned long rcu_batches_completed_bh(void)
{
@@ -108,7 +132,7 @@ static inline unsigned long rcu_batches_completed_bh(void)
}
/*
- * Return the number of sched grace periods.
+ * Return the number of sched grace periods completed.
*/
static inline unsigned long rcu_batches_completed_sched(void)
{
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index 9885bfb6b123..c0dd124e69ec 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -81,6 +81,9 @@ void cond_synchronize_rcu(unsigned long oldstate);
extern unsigned long rcutorture_testseq;
extern unsigned long rcutorture_vernum;
+unsigned long rcu_batches_started(void);
+unsigned long rcu_batches_started_bh(void);
+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);
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index aadbc072ccf4..24142c200901 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -244,6 +244,7 @@ struct rcu_torture_ops {
int (*readlock)(void);
void (*read_delay)(struct torture_random_state *rrsp);
void (*readunlock)(int idx);
+ unsigned long (*started)(void);
unsigned long (*completed)(void);
void (*deferred_free)(struct rcu_torture *p);
void (*sync)(void);
@@ -372,6 +373,7 @@ static struct rcu_torture_ops rcu_ops = {
.readlock = rcu_torture_read_lock,
.read_delay = rcu_read_delay,
.readunlock = rcu_torture_read_unlock,
+ .started = rcu_batches_started,
.completed = rcu_batches_completed,
.deferred_free = rcu_torture_deferred_free,
.sync = synchronize_rcu,
@@ -413,6 +415,7 @@ static struct rcu_torture_ops rcu_bh_ops = {
.readlock = rcu_bh_torture_read_lock,
.read_delay = rcu_read_delay, /* just reuse rcu's version. */
.readunlock = rcu_bh_torture_read_unlock,
+ .started = rcu_batches_started_bh,
.completed = rcu_batches_completed_bh,
.deferred_free = rcu_bh_torture_deferred_free,
.sync = synchronize_rcu_bh,
@@ -456,6 +459,7 @@ static struct rcu_torture_ops rcu_busted_ops = {
.readlock = rcu_torture_read_lock,
.read_delay = rcu_read_delay, /* just reuse rcu's version. */
.readunlock = rcu_torture_read_unlock,
+ .started = rcu_no_completed,
.completed = rcu_no_completed,
.deferred_free = rcu_busted_torture_deferred_free,
.sync = synchronize_rcu_busted,
@@ -554,6 +558,7 @@ static struct rcu_torture_ops srcu_ops = {
.readlock = srcu_torture_read_lock,
.read_delay = srcu_read_delay,
.readunlock = srcu_torture_read_unlock,
+ .started = NULL,
.completed = srcu_torture_completed,
.deferred_free = srcu_torture_deferred_free,
.sync = srcu_torture_synchronize,
@@ -590,6 +595,7 @@ static struct rcu_torture_ops sched_ops = {
.readlock = sched_torture_read_lock,
.read_delay = rcu_read_delay, /* just reuse rcu's version. */
.readunlock = sched_torture_read_unlock,
+ .started = rcu_batches_started_sched,
.completed = rcu_batches_completed_sched,
.deferred_free = rcu_sched_torture_deferred_free,
.sync = synchronize_sched,
@@ -628,6 +634,7 @@ static struct rcu_torture_ops tasks_ops = {
.readlock = tasks_torture_read_lock,
.read_delay = rcu_read_delay, /* just reuse rcu's version. */
.readunlock = tasks_torture_read_unlock,
+ .started = rcu_no_completed,
.completed = rcu_no_completed,
.deferred_free = rcu_tasks_torture_deferred_free,
.sync = synchronize_rcu_tasks,
@@ -1005,8 +1012,8 @@ static void rcutorture_trace_dump(void)
static void rcu_torture_timer(unsigned long unused)
{
int idx;
+ unsigned long started;
unsigned long completed;
- unsigned long completed_end;
static DEFINE_TORTURE_RANDOM(rand);
static DEFINE_SPINLOCK(rand_lock);
struct rcu_torture *p;
@@ -1014,7 +1021,10 @@ static void rcu_torture_timer(unsigned long unused)
unsigned long long ts;
idx = cur_ops->readlock();
- completed = cur_ops->completed();
+ if (cur_ops->started)
+ started = cur_ops->started();
+ else
+ started = cur_ops->completed();
ts = rcu_trace_clock_local();
p = rcu_dereference_check(rcu_torture_current,
rcu_read_lock_bh_held() ||
@@ -1037,14 +1047,16 @@ static void rcu_torture_timer(unsigned long unused)
/* Should not happen, but... */
pipe_count = RCU_TORTURE_PIPE_LEN;
}
- completed_end = cur_ops->completed();
+ completed = cur_ops->completed();
if (pipe_count > 1) {
do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu, ts,
- completed, completed_end);
+ started, completed);
rcutorture_trace_dump();
}
__this_cpu_inc(rcu_torture_count[pipe_count]);
- completed = completed_end - completed;
+ completed = completed - started;
+ if (cur_ops->started)
+ completed++;
if (completed > RCU_TORTURE_PIPE_LEN) {
/* Should not happen, but... */
completed = RCU_TORTURE_PIPE_LEN;
@@ -1063,8 +1075,8 @@ static void rcu_torture_timer(unsigned long unused)
static int
rcu_torture_reader(void *arg)
{
+ unsigned long started;
unsigned long completed;
- unsigned long completed_end;
int idx;
DEFINE_TORTURE_RANDOM(rand);
struct rcu_torture *p;
@@ -1083,7 +1095,10 @@ rcu_torture_reader(void *arg)
mod_timer(&t, jiffies + 1);
}
idx = cur_ops->readlock();
- completed = cur_ops->completed();
+ if (cur_ops->started)
+ started = cur_ops->started();
+ else
+ started = cur_ops->completed();
ts = rcu_trace_clock_local();
p = rcu_dereference_check(rcu_torture_current,
rcu_read_lock_bh_held() ||
@@ -1104,14 +1119,16 @@ rcu_torture_reader(void *arg)
/* Should not happen, but... */
pipe_count = RCU_TORTURE_PIPE_LEN;
}
- completed_end = cur_ops->completed();
+ completed = cur_ops->completed();
if (pipe_count > 1) {
do_trace_rcu_torture_read(cur_ops->name, &p->rtort_rcu,
- ts, completed, completed_end);
+ ts, started, completed);
rcutorture_trace_dump();
}
__this_cpu_inc(rcu_torture_count[pipe_count]);
- completed = completed_end - completed;
+ completed = completed - started;
+ if (cur_ops->started)
+ completed++;
if (completed > RCU_TORTURE_PIPE_LEN) {
/* Should not happen, but... */
completed = RCU_TORTURE_PIPE_LEN;
diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
index e26d78712e16..c0faad51ae87 100644
--- a/kernel/rcu/tree.c
+++ b/kernel/rcu/tree.c
@@ -315,7 +315,43 @@ static void force_quiescent_state(struct rcu_state *rsp);
static int rcu_pending(void);
/*
- * Return the number of RCU-sched batches processed thus far for debug & stats.
+ * Return the number of RCU batches started thus far for debug & stats.
+ */
+unsigned long rcu_batches_started(void)
+{
+ return rcu_state_p->gpnum;
+}
+EXPORT_SYMBOL_GPL(rcu_batches_started);
+
+/*
+ * Return the number of RCU-sched batches started thus far for debug & stats.
+ */
+unsigned long rcu_batches_started_sched(void)
+{
+ return rcu_sched_state.gpnum;
+}
+EXPORT_SYMBOL_GPL(rcu_batches_started_sched);
+
+/*
+ * Return the number of RCU BH batches started thus far for debug & stats.
+ */
+unsigned long rcu_batches_started_bh(void)
+{
+ return rcu_bh_state.gpnum;
+}
+EXPORT_SYMBOL_GPL(rcu_batches_started_bh);
+
+/*
+ * Return the number of RCU batches completed thus far for debug & stats.
+ */
+unsigned long rcu_batches_completed(void)
+{
+ return rcu_state_p->completed;
+}
+EXPORT_SYMBOL_GPL(rcu_batches_completed);
+
+/*
+ * Return the number of RCU-sched batches completed thus far for debug & stats.
*/
unsigned long rcu_batches_completed_sched(void)
{
@@ -324,7 +360,7 @@ unsigned long rcu_batches_completed_sched(void)
EXPORT_SYMBOL_GPL(rcu_batches_completed_sched);
/*
- * Return the number of RCU BH batches processed thus far for debug & stats.
+ * Return the number of RCU BH batches completed thus far for debug & stats.
*/
unsigned long rcu_batches_completed_bh(void)
{
diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
index f69300d4a51f..07e61a04de1d 100644
--- a/kernel/rcu/tree_plugin.h
+++ b/kernel/rcu/tree_plugin.h
@@ -114,25 +114,6 @@ static void __init rcu_bootup_announce(void)
}
/*
- * Return the number of RCU-preempt batches processed thus far
- * for debug and statistics.
- */
-static unsigned long rcu_batches_completed_preempt(void)
-{
- return rcu_preempt_state.completed;
-}
-EXPORT_SYMBOL_GPL(rcu_batches_completed_preempt);
-
-/*
- * Return the number of RCU batches processed thus far for debug & stats.
- */
-unsigned long rcu_batches_completed(void)
-{
- return rcu_batches_completed_preempt();
-}
-EXPORT_SYMBOL_GPL(rcu_batches_completed);
-
-/*
* Record a preemptible-RCU quiescent state for the specified CPU. Note
* that this just means that the task currently running on the CPU is
* not in a quiescent state. There might be any number of tasks blocked
@@ -933,15 +914,6 @@ static void __init rcu_bootup_announce(void)
}
/*
- * Return the number of RCU batches processed thus far for debug & stats.
- */
-unsigned long rcu_batches_completed(void)
-{
- return rcu_batches_completed_sched();
-}
-EXPORT_SYMBOL_GPL(rcu_batches_completed);
-
-/*
* Because preemptible RCU does not exist, we never have to check for
* CPUs being in quiescent states.
*/
--
1.8.1.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH tip/core/rcu 09/12] rcutorture: Handle different mpstat versions
2015-01-07 18:19 ` [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows Paul E. McKenney
` (6 preceding siblings ...)
2015-01-07 18:19 ` [PATCH tip/core/rcu 08/12] rcutorture: Check from beginning to end of grace period Paul E. McKenney
@ 2015-01-07 18:19 ` Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 10/12] torture: Add "-enable-kvm -soundhw pcspk" to qemu command line Paul E. McKenney
` (2 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Paul E. McKenney @ 2015-01-07 18:19 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
bobby.prani, Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
The mpstat command recently added the %gnice column, which messes up
the cpu2use.sh script's idle-CPU calculations. This commit therefore
uses $NF instead of $12 to select the last (%idle) column.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
tools/testing/selftests/rcutorture/bin/cpus2use.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/rcutorture/bin/cpus2use.sh b/tools/testing/selftests/rcutorture/bin/cpus2use.sh
index abe14b7f36e9..bb99cde3f5f9 100755
--- a/tools/testing/selftests/rcutorture/bin/cpus2use.sh
+++ b/tools/testing/selftests/rcutorture/bin/cpus2use.sh
@@ -24,7 +24,7 @@
ncpus=`grep '^processor' /proc/cpuinfo | wc -l`
idlecpus=`mpstat | tail -1 | \
- awk -v ncpus=$ncpus '{ print ncpus * ($7 + $12) / 100 }'`
+ awk -v ncpus=$ncpus '{ print ncpus * ($7 + $NF) / 100 }'`
awk -v ncpus=$ncpus -v idlecpus=$idlecpus < /dev/null '
BEGIN {
cpus2use = idlecpus;
--
1.8.1.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH tip/core/rcu 10/12] torture: Add "-enable-kvm -soundhw pcspk" to qemu command line
2015-01-07 18:19 ` [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows Paul E. McKenney
` (7 preceding siblings ...)
2015-01-07 18:19 ` [PATCH tip/core/rcu 09/12] rcutorture: Handle different mpstat versions Paul E. McKenney
@ 2015-01-07 18:19 ` Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 11/12] torture: Flag console.log file to prevent holdovers from earlier runs Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 12/12] rcutorture: Add more diagnostics in rcu_barrier() test failure case Paul E. McKenney
10 siblings, 0 replies; 13+ messages in thread
From: Paul E. McKenney @ 2015-01-07 18:19 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
bobby.prani, Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
More recent qemu implementations really want "-enable-kvm", and the
"-soundhw pcspk" makes the script a bit less dependent on odd audio
libraries being installed. This commit therefore adds both to the
default qemu command line.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
index 8ca9f21f2efc..35b8532ed053 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -8,9 +8,9 @@
#
# Usage: kvm-test-1-run.sh config builddir resdir minutes qemu-args boot_args
#
-# qemu-args defaults to "-nographic", along with arguments specifying the
-# number of CPUs and other options generated from
-# the underlying CPU architecture.
+# qemu-args defaults to "-enable-kvm -soundhw pcspk -nographic", along with
+# arguments specifying the number of CPUs and other
+# options generated from the underlying CPU architecture.
# boot_args defaults to value returned by the per_version_boot_params
# shell function.
#
@@ -138,7 +138,7 @@ then
fi
# Generate -smp qemu argument.
-qemu_args="-nographic $qemu_args"
+qemu_args="-enable-kvm -soundhw pcspk -nographic $qemu_args"
cpu_count=`configNR_CPUS.sh $config_template`
cpu_count=`configfrag_boot_cpus "$boot_args" "$config_template" "$cpu_count"`
vcpus=`identify_qemu_vcpus`
--
1.8.1.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH tip/core/rcu 11/12] torture: Flag console.log file to prevent holdovers from earlier runs
2015-01-07 18:19 ` [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows Paul E. McKenney
` (8 preceding siblings ...)
2015-01-07 18:19 ` [PATCH tip/core/rcu 10/12] torture: Add "-enable-kvm -soundhw pcspk" to qemu command line Paul E. McKenney
@ 2015-01-07 18:19 ` Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 12/12] rcutorture: Add more diagnostics in rcu_barrier() test failure case Paul E. McKenney
10 siblings, 0 replies; 13+ messages in thread
From: Paul E. McKenney @ 2015-01-07 18:19 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
bobby.prani, Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
A system misconfiguration that prevents qemu from running at all (for
example, a missing dynamically linked library) will keep the console.log
file from the previous run. This can fool the developer into thinking
that this failed run actually completed correctly. This commit therefore
overwrites the console.log file just before launching qemu.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
index 35b8532ed053..5236e073919d 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh
@@ -168,6 +168,7 @@ then
touch $resdir/buildonly
exit 0
fi
+echo "NOTE: $QEMU either did not run or was interactive" > $builddir/console.log
echo $QEMU $qemu_args -m 512 -kernel $resdir/bzImage -append \"$qemu_append $boot_args\" > $resdir/qemu-cmd
( $QEMU $qemu_args -m 512 -kernel $resdir/bzImage -append "$qemu_append $boot_args"; echo $? > $resdir/qemu-retval ) &
qemu_pid=$!
--
1.8.1.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [PATCH tip/core/rcu 12/12] rcutorture: Add more diagnostics in rcu_barrier() test failure case
2015-01-07 18:19 ` [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows Paul E. McKenney
` (9 preceding siblings ...)
2015-01-07 18:19 ` [PATCH tip/core/rcu 11/12] torture: Flag console.log file to prevent holdovers from earlier runs Paul E. McKenney
@ 2015-01-07 18:19 ` Paul E. McKenney
10 siblings, 0 replies; 13+ messages in thread
From: Paul E. McKenney @ 2015-01-07 18:19 UTC (permalink / raw)
To: linux-kernel
Cc: mingo, laijs, dipankar, akpm, mathieu.desnoyers, josh, tglx,
peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
bobby.prani, Paul E. McKenney
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
kernel/rcu/rcutorture.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
index 24142c200901..30d42aa55d83 100644
--- a/kernel/rcu/rcutorture.c
+++ b/kernel/rcu/rcutorture.c
@@ -1427,6 +1427,9 @@ static int rcu_torture_barrier(void *arg)
cur_ops->cb_barrier(); /* Implies smp_mb() for wait_event(). */
if (atomic_read(&barrier_cbs_invoked) != n_barrier_cbs) {
n_rcu_torture_barrier_error++;
+ pr_err("barrier_cbs_invoked = %d, n_barrier_cbs = %d\n",
+ atomic_read(&barrier_cbs_invoked),
+ n_barrier_cbs);
WARN_ON_ONCE(1);
}
n_barrier_successes++;
--
1.8.1.5
^ permalink raw reply related [flat|nested] 13+ messages in thread
end of thread, other threads:[~2015-01-07 18:23 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-07 18:19 [PATCH tip/core/rcu 0/12] rcutorture changes for 3.20 Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 01/12] rcutorture: Issue warnings on close calls due to Reader Batch blows Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 02/12] rcu: Make _batches_completed() functions return unsigned long Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 03/12] rcutorture: Make build-output parsing correctly flag RCU's warnings Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 04/12] rcutorture: Use unsigned for Reader Batch computations Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 05/12] rcu: provide rcu_batches_completed_sched() for TINY_RCU Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 06/12] rcutorture: Drop rcu_torture_completed() and friends Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 07/12] rcu: Remove redundant rcu_batches_completed() declaration Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 08/12] rcutorture: Check from beginning to end of grace period Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 09/12] rcutorture: Handle different mpstat versions Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 10/12] torture: Add "-enable-kvm -soundhw pcspk" to qemu command line Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 11/12] torture: Flag console.log file to prevent holdovers from earlier runs Paul E. McKenney
2015-01-07 18:19 ` [PATCH tip/core/rcu 12/12] rcutorture: Add more diagnostics in rcu_barrier() test failure case Paul E. McKenney
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).