LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH rcu 0/5] Torture-script updates for v5.16
@ 2021-09-16  0:27 Paul E. McKenney
  2021-09-16  0:27 ` [PATCH rcu 1/5] torture: Apply CONFIG_KCSAN_STRICT to kvm.sh --kcsan argument Paul E. McKenney
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Paul E. McKenney @ 2021-09-16  0:27 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel

Hello!

This series contains torture-script updates:

1.	Apply CONFIG_KCSAN_STRICT to kvm.sh --kcsan argument.

2.	Make torture.sh print the number of files to be compressed.

3.	Add an extract-stall script.

4.	Allot 1G of memory for scftorture runs.

5.	Make kvm-remote.sh print size of downloaded tarball.

						Thanx, Paul

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

 b/tools/rcu/extract-stall.sh                           |   33 +++++++++++++++++
 b/tools/testing/selftests/rcutorture/bin/kvm-remote.sh |    1 
 b/tools/testing/selftests/rcutorture/bin/kvm.sh        |    2 -
 b/tools/testing/selftests/rcutorture/bin/torture.sh    |    9 +++-
 tools/testing/selftests/rcutorture/bin/torture.sh      |    2 -
 5 files changed, 43 insertions(+), 4 deletions(-)

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

* [PATCH rcu 1/5] torture: Apply CONFIG_KCSAN_STRICT to kvm.sh --kcsan argument
  2021-09-16  0:27 [PATCH rcu 0/5] Torture-script updates for v5.16 Paul E. McKenney
@ 2021-09-16  0:27 ` Paul E. McKenney
  2021-09-16  0:27 ` [PATCH rcu 2/5] torture: Make torture.sh print the number of files to be compressed Paul E. McKenney
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2021-09-16  0:27 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

Currently, the --kcsan argument to kvm.sh applies a laundry list of
Kconfig options.  Now that KCSAN provides the CONFIG_KCSAN_STRICT Kconfig
option, this commit reduces the laundry list to this one option.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh
index f442d84fb2a3..6cf9ec6a3d1c 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm.sh
@@ -184,7 +184,7 @@ do
 		TORTURE_KCONFIG_KASAN_ARG="CONFIG_DEBUG_INFO=y CONFIG_KASAN=y"; export TORTURE_KCONFIG_KASAN_ARG
 		;;
 	--kcsan)
-		TORTURE_KCONFIG_KCSAN_ARG="CONFIG_DEBUG_INFO=y CONFIG_KCSAN=y CONFIG_KCSAN_ASSUME_PLAIN_WRITES_ATOMIC=n CONFIG_KCSAN_REPORT_VALUE_CHANGE_ONLY=n CONFIG_KCSAN_REPORT_ONCE_IN_MS=100000 CONFIG_KCSAN_INTERRUPT_WATCHER=y CONFIG_KCSAN_VERBOSE=y CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_PROVE_LOCKING=y"; export TORTURE_KCONFIG_KCSAN_ARG
+		TORTURE_KCONFIG_KCSAN_ARG="CONFIG_DEBUG_INFO=y CONFIG_KCSAN=y CONFIG_KCSAN_STRICT=y CONFIG_KCSAN_REPORT_ONCE_IN_MS=100000 CONFIG_KCSAN_VERBOSE=y CONFIG_DEBUG_LOCK_ALLOC=y CONFIG_PROVE_LOCKING=y"; export TORTURE_KCONFIG_KCSAN_ARG
 		;;
 	--kmake-arg|--kmake-args)
 		checkarg --kmake-arg "(kernel make arguments)" $# "$2" '.*' '^error$'
-- 
2.31.1.189.g2e36527f23


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

* [PATCH rcu 2/5] torture: Make torture.sh print the number of files to be compressed
  2021-09-16  0:27 [PATCH rcu 0/5] Torture-script updates for v5.16 Paul E. McKenney
  2021-09-16  0:27 ` [PATCH rcu 1/5] torture: Apply CONFIG_KCSAN_STRICT to kvm.sh --kcsan argument Paul E. McKenney
@ 2021-09-16  0:27 ` Paul E. McKenney
  2021-09-16  0:27 ` [PATCH rcu 3/5] tools/rcu: Add an extract-stall script Paul E. McKenney
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2021-09-16  0:27 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

Compressing gigabyte vmlinux files can take some time, and it can be a
bit annoying to not know many more batches of compression there will be.
This commit therefore makes torture.sh print the number of files to be
compressed just before starting compression and just after compression
completes.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/torture.sh | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index 363f56081eff..8e882346d2a6 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -434,7 +434,12 @@ then
 	batchno=1
 	if test -s $T/xz-todo
 	then
-		echo Size before compressing: `du -sh $tdir | awk '{ print $1 }'` `date` 2>&1 | tee -a "$tdir/log-xz" | tee -a $T/log
+		for i in `cat $T/xz-todo`
+		do
+			find $i -name 'vmlinux*' -print
+		done | wc -l | awk '{ print $1 }' > $T/xz-todo-count
+		n2compress="`cat $T/xz-todo-count`"
+		echo Size before compressing $n2compress files: `du -sh $tdir | awk '{ print $1 }'` `date` 2>&1 | tee -a "$tdir/log-xz" | tee -a $T/log
 		for i in `cat $T/xz-todo`
 		do
 			echo Compressing vmlinux files in ${i}: `date` >> "$tdir/log-xz" 2>&1
@@ -456,7 +461,7 @@ then
 			echo Waiting for final batch $batchno of $ncompresses compressions `date` | tee -a "$tdir/log-xz" | tee -a $T/log
 		fi
 		wait
-		echo Size after compressing: `du -sh $tdir | awk '{ print $1 }'` `date` 2>&1 | tee -a "$tdir/log-xz" | tee -a $T/log
+		echo Size after compressing $n2compress files: `du -sh $tdir | awk '{ print $1 }'` `date` 2>&1 | tee -a "$tdir/log-xz" | tee -a $T/log
 		echo Total duration `get_starttime_duration $starttime`. | tee -a $T/log
 	else
 		echo No compression needed: `date` >> "$tdir/log-xz" 2>&1
-- 
2.31.1.189.g2e36527f23


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

* [PATCH rcu 3/5] tools/rcu: Add an extract-stall script
  2021-09-16  0:27 [PATCH rcu 0/5] Torture-script updates for v5.16 Paul E. McKenney
  2021-09-16  0:27 ` [PATCH rcu 1/5] torture: Apply CONFIG_KCSAN_STRICT to kvm.sh --kcsan argument Paul E. McKenney
  2021-09-16  0:27 ` [PATCH rcu 2/5] torture: Make torture.sh print the number of files to be compressed Paul E. McKenney
@ 2021-09-16  0:27 ` Paul E. McKenney
  2021-09-16  0:27 ` [PATCH rcu 4/5] torture: Allot 1G of memory for scftorture runs Paul E. McKenney
  2021-09-16  0:28 ` [PATCH rcu 5/5] torture: Make kvm-remote.sh print size of downloaded tarball Paul E. McKenney
  4 siblings, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2021-09-16  0:27 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

This commit adds a script that extracts RCU CPU stall warnings
from console output.  The user can optionally specify the number of
lines preceding the stall to output, and also the number of lines of
stall-warning text.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/rcu/extract-stall.sh | 33 +++++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 tools/rcu/extract-stall.sh

diff --git a/tools/rcu/extract-stall.sh b/tools/rcu/extract-stall.sh
new file mode 100644
index 000000000000..d10ffbf7be0c
--- /dev/null
+++ b/tools/rcu/extract-stall.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# Extract any RCU CPU stall warnings present in specified file.
+# Filter out clocksource lines.  Note that preceding-lines excludes the
+# initial line of the stall warning but trailing-lines includes it.
+#
+# Usage: extract-stall.sh dmesg-file [ preceding-lines [ trailing-lines ] ]
+
+echo $1
+preceding_lines="${2-3}"
+trailing_lines="${3-10}"
+
+awk -v preceding_lines="$preceding_lines" -v trailing_lines="$trailing_lines" '
+suffix <= 0 {
+	for (i = preceding_lines; i > 0; i--)
+		last[i] = last[i - 1];
+	last[0] = $0;
+}
+
+suffix > 0 {
+	print $0;
+	suffix--;
+	if (suffix <= 0)
+		print "";
+}
+
+suffix <= 0 && /detected stall/ {
+	for (i = preceding_lines; i >= 0; i--)
+		if (last[i] != "")
+			print last[i];
+	suffix = trailing_lines;
+}' < "$1" | tr -d '\015' | grep -v clocksource
+
-- 
2.31.1.189.g2e36527f23


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

* [PATCH rcu 4/5] torture: Allot 1G of memory for scftorture runs
  2021-09-16  0:27 [PATCH rcu 0/5] Torture-script updates for v5.16 Paul E. McKenney
                   ` (2 preceding siblings ...)
  2021-09-16  0:27 ` [PATCH rcu 3/5] tools/rcu: Add an extract-stall script Paul E. McKenney
@ 2021-09-16  0:27 ` Paul E. McKenney
  2021-09-16  0:28 ` [PATCH rcu 5/5] torture: Make kvm-remote.sh print size of downloaded tarball Paul E. McKenney
  4 siblings, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2021-09-16  0:27 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

By default, torture.sh allots 512M of memory for each guest OS.  However,
when running scftorture with KASAN, 1G is needed.  This commit therefore
causes torture.sh to provide the required 1G.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/torture.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/rcutorture/bin/torture.sh b/tools/testing/selftests/rcutorture/bin/torture.sh
index 8e882346d2a6..eae88aacca2a 100755
--- a/tools/testing/selftests/rcutorture/bin/torture.sh
+++ b/tools/testing/selftests/rcutorture/bin/torture.sh
@@ -351,7 +351,7 @@ fi
 if test "$do_scftorture" = "yes"
 then
 	torture_bootargs="scftorture.nthreads=$HALF_ALLOTED_CPUS torture.disable_onoff_at_boot"
-	torture_set "scftorture" tools/testing/selftests/rcutorture/bin/kvm.sh --torture scf --allcpus --duration "$duration_scftorture" --configs "$configs_scftorture" --kconfig "CONFIG_NR_CPUS=$HALF_ALLOTED_CPUS" --trust-make
+	torture_set "scftorture" tools/testing/selftests/rcutorture/bin/kvm.sh --torture scf --allcpus --duration "$duration_scftorture" --configs "$configs_scftorture" --kconfig "CONFIG_NR_CPUS=$HALF_ALLOTED_CPUS" --memory 1G --trust-make
 fi
 
 if test "$do_refscale" = yes
-- 
2.31.1.189.g2e36527f23


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

* [PATCH rcu 5/5] torture: Make kvm-remote.sh print size of downloaded tarball
  2021-09-16  0:27 [PATCH rcu 0/5] Torture-script updates for v5.16 Paul E. McKenney
                   ` (3 preceding siblings ...)
  2021-09-16  0:27 ` [PATCH rcu 4/5] torture: Allot 1G of memory for scftorture runs Paul E. McKenney
@ 2021-09-16  0:28 ` Paul E. McKenney
  4 siblings, 0 replies; 6+ messages in thread
From: Paul E. McKenney @ 2021-09-16  0:28 UTC (permalink / raw)
  To: rcu
  Cc: linux-kernel, kernel-team, mingo, jiangshanlai, akpm,
	mathieu.desnoyers, josh, tglx, peterz, rostedt, dhowells,
	edumazet, fweisbec, oleg, joel, Paul E. McKenney

This commit causes kvm-remote.sh to print the size of the tarball that
is downloaded to each of the remote systems.  This size can help with
performance projections and analysis.

Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
---
 tools/testing/selftests/rcutorture/bin/kvm-remote.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/rcutorture/bin/kvm-remote.sh b/tools/testing/selftests/rcutorture/bin/kvm-remote.sh
index 03126eb6ec5a..c7d42ef80c53 100755
--- a/tools/testing/selftests/rcutorture/bin/kvm-remote.sh
+++ b/tools/testing/selftests/rcutorture/bin/kvm-remote.sh
@@ -149,6 +149,7 @@ do
 done
 
 # Download and expand the tarball on all systems.
+echo Build-products tarball: `du -h $T/binres.tgz` | tee -a "$oldrun/remote-log"
 for i in $systems
 do
 	echo Downloading tarball to $i `date` | tee -a "$oldrun/remote-log"
-- 
2.31.1.189.g2e36527f23


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

end of thread, other threads:[~2021-09-16  0:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-16  0:27 [PATCH rcu 0/5] Torture-script updates for v5.16 Paul E. McKenney
2021-09-16  0:27 ` [PATCH rcu 1/5] torture: Apply CONFIG_KCSAN_STRICT to kvm.sh --kcsan argument Paul E. McKenney
2021-09-16  0:27 ` [PATCH rcu 2/5] torture: Make torture.sh print the number of files to be compressed Paul E. McKenney
2021-09-16  0:27 ` [PATCH rcu 3/5] tools/rcu: Add an extract-stall script Paul E. McKenney
2021-09-16  0:27 ` [PATCH rcu 4/5] torture: Allot 1G of memory for scftorture runs Paul E. McKenney
2021-09-16  0:28 ` [PATCH rcu 5/5] torture: Make kvm-remote.sh print size of downloaded tarball 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).