public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH tip/core/rcu 0/4] Torture-test updates for 4.6
@ 2016-02-24  5:16 Paul E. McKenney
  2016-02-24  5:17 ` [PATCH tip/core/rcu 1/4] rcutorture: Add checks for rcutorture writer starvation Paul E. McKenney
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Paul E. McKenney @ 2016-02-24  5:16 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, jiangshanlai, dipankar, akpm, mathieu.desnoyers, josh,
	tglx, peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani

Hello!

This series provides torture-test updates:

1.	Add checks for rcutorture writer starvation.

2.	Don't keep empty console.log.diags files.

3.	Make rcutorture scripts check for self-detected stalls.

4.	Export rcu_gp_is_normal() so that it can be used in torture tests
	when run as modules.

							Thanx, Paul

------------------------------------------------------------------------

 kernel/rcu/update.c                                     |    1 +
 tools/testing/selftests/rcutorture/bin/parse-console.sh |   10 ++++++----
 2 files changed, 7 insertions(+), 4 deletions(-)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH tip/core/rcu 1/4] rcutorture: Add checks for rcutorture writer starvation
  2016-02-24  5:16 [PATCH tip/core/rcu 0/4] Torture-test updates for 4.6 Paul E. McKenney
@ 2016-02-24  5:17 ` Paul E. McKenney
  2016-02-24  5:17 ` [PATCH tip/core/rcu 2/4] rcutorture: Don't keep empty console.log.diags files Paul E. McKenney
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2016-02-24  5:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, jiangshanlai, dipankar, akpm, mathieu.desnoyers, josh,
	tglx, peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

This commit adds checks for rcutorture writer starvation, so that
instances will be added to the test summary.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 tools/testing/selftests/rcutorture/bin/parse-console.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/parse-console.sh b/tools/testing/selftests/rcutorture/bin/parse-console.sh
index 844787a0d7be..0f1520fb5f81 100755
--- a/tools/testing/selftests/rcutorture/bin/parse-console.sh
+++ b/tools/testing/selftests/rcutorture/bin/parse-console.sh
@@ -33,7 +33,7 @@ if grep -Pq '\x00' < $file
 then
 	print_warning Console output contains nul bytes, old qemu still running?
 fi
-egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:|detected stalls on CPUs/tasks:|Stall ended before state dump start' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $1.diags
+egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:|detected stalls on CPUs/tasks:|Stall ended before state dump start|\?\?\? Writer stall state' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $1.diags
 if test -s $1.diags
 then
 	print_warning Assertion failure in $file $title
@@ -64,7 +64,7 @@ then
 	then
 		summary="$summary  lockdep: $n_badness"
 	fi
-	n_stalls=`egrep -c 'detected stalls on CPUs/tasks:|Stall ended before state dump start' $1`
+	n_stalls=`egrep -c 'detected stalls on CPUs/tasks:|Stall ended before state dump start|\?\?\? Writer stall state' $1`
 	if test "$n_stalls" -ne 0
 	then
 		summary="$summary  Stalls: $n_stalls"
-- 
2.5.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH tip/core/rcu 2/4] rcutorture: Don't keep empty console.log.diags files
  2016-02-24  5:16 [PATCH tip/core/rcu 0/4] Torture-test updates for 4.6 Paul E. McKenney
  2016-02-24  5:17 ` [PATCH tip/core/rcu 1/4] rcutorture: Add checks for rcutorture writer starvation Paul E. McKenney
@ 2016-02-24  5:17 ` Paul E. McKenney
  2016-02-24  5:17 ` [PATCH tip/core/rcu 3/4] rcutorture: Check for self-detected stalls Paul E. McKenney
  2016-02-24  5:17 ` [PATCH tip/core/rcu 4/4] rcu: Export rcu_gp_is_normal() Paul E. McKenney
  3 siblings, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2016-02-24  5:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, jiangshanlai, dipankar, akpm, mathieu.desnoyers, josh,
	tglx, peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

Currently, an error-free run produces an empty console.log.diags file.
This can be annoying when using "vi */console.log.diags" to see a full
summary of the errors.  This commit therefore removes any empty files
during the analysis process.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 tools/testing/selftests/rcutorture/bin/parse-console.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/testing/selftests/rcutorture/bin/parse-console.sh b/tools/testing/selftests/rcutorture/bin/parse-console.sh
index 0f1520fb5f81..c6b0e46214f2 100755
--- a/tools/testing/selftests/rcutorture/bin/parse-console.sh
+++ b/tools/testing/selftests/rcutorture/bin/parse-console.sh
@@ -70,4 +70,6 @@ then
 		summary="$summary  Stalls: $n_stalls"
 	fi
 	print_warning Summary: $summary
+else
+	rm $1.diags
 fi
-- 
2.5.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH tip/core/rcu 3/4] rcutorture: Check for self-detected stalls
  2016-02-24  5:16 [PATCH tip/core/rcu 0/4] Torture-test updates for 4.6 Paul E. McKenney
  2016-02-24  5:17 ` [PATCH tip/core/rcu 1/4] rcutorture: Add checks for rcutorture writer starvation Paul E. McKenney
  2016-02-24  5:17 ` [PATCH tip/core/rcu 2/4] rcutorture: Don't keep empty console.log.diags files Paul E. McKenney
@ 2016-02-24  5:17 ` Paul E. McKenney
  2016-02-24  5:17 ` [PATCH tip/core/rcu 4/4] rcu: Export rcu_gp_is_normal() Paul E. McKenney
  3 siblings, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2016-02-24  5:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, jiangshanlai, dipankar, akpm, mathieu.desnoyers, josh,
	tglx, peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

The current scripts parse console output only for cases where one CPU
detect a stall on some other CPU or task.  This commit therefore adds
checks for self-detected stalls.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 tools/testing/selftests/rcutorture/bin/parse-console.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/parse-console.sh b/tools/testing/selftests/rcutorture/bin/parse-console.sh
index c6b0e46214f2..5eb49b7f864c 100755
--- a/tools/testing/selftests/rcutorture/bin/parse-console.sh
+++ b/tools/testing/selftests/rcutorture/bin/parse-console.sh
@@ -33,7 +33,7 @@ if grep -Pq '\x00' < $file
 then
 	print_warning Console output contains nul bytes, old qemu still running?
 fi
-egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:|detected stalls on CPUs/tasks:|Stall ended before state dump start|\?\?\? Writer stall state' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $1.diags
+egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:|detected stalls on CPUs/tasks:|self-detected stall on CPU|Stall ended before state dump start|\?\?\? Writer stall state' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $1.diags
 if test -s $1.diags
 then
 	print_warning Assertion failure in $file $title
@@ -64,7 +64,7 @@ then
 	then
 		summary="$summary  lockdep: $n_badness"
 	fi
-	n_stalls=`egrep -c 'detected stalls on CPUs/tasks:|Stall ended before state dump start|\?\?\? Writer stall state' $1`
+	n_stalls=`egrep -c 'detected stalls on CPUs/tasks:|self-detected stall on CPU|Stall ended before state dump start|\?\?\? Writer stall state' $1`
 	if test "$n_stalls" -ne 0
 	then
 		summary="$summary  Stalls: $n_stalls"
-- 
2.5.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH tip/core/rcu 4/4] rcu: Export rcu_gp_is_normal()
  2016-02-24  5:16 [PATCH tip/core/rcu 0/4] Torture-test updates for 4.6 Paul E. McKenney
                   ` (2 preceding siblings ...)
  2016-02-24  5:17 ` [PATCH tip/core/rcu 3/4] rcutorture: Check for self-detected stalls Paul E. McKenney
@ 2016-02-24  5:17 ` Paul E. McKenney
  3 siblings, 0 replies; 5+ messages in thread
From: Paul E. McKenney @ 2016-02-24  5:17 UTC (permalink / raw)
  To: linux-kernel
  Cc: mingo, jiangshanlai, dipankar, akpm, mathieu.desnoyers, josh,
	tglx, peterz, rostedt, dhowells, edumazet, dvhart, fweisbec, oleg,
	bobby.prani, Paul E. McKenney

This commit exports rcu_gp_is_normal() in order to allow it to be used
by rcutorture and rcuperf.

Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
---
 kernel/rcu/update.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c
index 76b94e19430b..ca828b41c938 100644
--- a/kernel/rcu/update.c
+++ b/kernel/rcu/update.c
@@ -128,6 +128,7 @@ bool rcu_gp_is_normal(void)
 {
 	return READ_ONCE(rcu_normal);
 }
+EXPORT_SYMBOL_GPL(rcu_gp_is_normal);
 
 static atomic_t rcu_expedited_nesting =
 	ATOMIC_INIT(IS_ENABLED(CONFIG_RCU_EXPEDITE_BOOT) ? 1 : 0);
-- 
2.5.2

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-02-24  5:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24  5:16 [PATCH tip/core/rcu 0/4] Torture-test updates for 4.6 Paul E. McKenney
2016-02-24  5:17 ` [PATCH tip/core/rcu 1/4] rcutorture: Add checks for rcutorture writer starvation Paul E. McKenney
2016-02-24  5:17 ` [PATCH tip/core/rcu 2/4] rcutorture: Don't keep empty console.log.diags files Paul E. McKenney
2016-02-24  5:17 ` [PATCH tip/core/rcu 3/4] rcutorture: Check for self-detected stalls Paul E. McKenney
2016-02-24  5:17 ` [PATCH tip/core/rcu 4/4] rcu: Export rcu_gp_is_normal() 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