aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-01-21 00:12:21 -0500
committerIngo Molnar <mingo@kernel.org>2015-01-21 00:12:21 -0500
commitf49028292c13b958fdf4f36c8cc8119d0dde187b (patch)
treeea1f92969a8aca7083f19c4ef07dd3674509554f /tools
parenteef8f4c2acac6fae84f2d959a145fa3cad4d00c9 (diff)
parent78e691f4ae2d5edea0199ca802bb505b9cdced88 (diff)
Merge branch 'for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu
Pull RCU updates from Paul E. McKenney: - Documentation updates. - Miscellaneous fixes. - Preemptible-RCU fixes, including fixing an old bug in the interaction of RCU priority boosting and CPU hotplug. - SRCU updates. - RCU CPU stall-warning updates. - RCU torture-test updates. Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/cpus2use.sh2
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-recheck-rcu.sh18
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/kvm-test-1-run.sh9
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/parse-build.sh20
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/parse-console.sh2
5 files changed, 38 insertions, 13 deletions
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 @@
24 24
25ncpus=`grep '^processor' /proc/cpuinfo | wc -l` 25ncpus=`grep '^processor' /proc/cpuinfo | wc -l`
26idlecpus=`mpstat | tail -1 | \ 26idlecpus=`mpstat | tail -1 | \
27 awk -v ncpus=$ncpus '{ print ncpus * ($7 + $12) / 100 }'` 27 awk -v ncpus=$ncpus '{ print ncpus * ($7 + $NF) / 100 }'`
28awk -v ncpus=$ncpus -v idlecpus=$idlecpus < /dev/null ' 28awk -v ncpus=$ncpus -v idlecpus=$idlecpus < /dev/null '
29BEGIN { 29BEGIN {
30 cpus2use = idlecpus; 30 cpus2use = idlecpus;
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
30 echo Unreadable results directory: $i 30 echo Unreadable results directory: $i
31 exit 1 31 exit 1
32fi 32fi
33. tools/testing/selftests/rcutorture/bin/functions.sh
33 34
34configfile=`echo $i | sed -e 's/^.*\///'` 35configfile=`echo $i | sed -e 's/^.*\///'`
35ngps=`grep ver: $i/console.log 2> /dev/null | tail -1 | sed -e 's/^.* ver: //' -e 's/ .*$//'` 36ngps=`grep ver: $i/console.log 2> /dev/null | tail -1 | sed -e 's/^.* ver: //' -e 's/ .*$//'`
@@ -48,4 +49,21 @@ else
48 title="$title ($ngpsps per second)" 49 title="$title ($ngpsps per second)"
49 fi 50 fi
50 echo $title 51 echo $title
52 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}'`
53 if test -z "$nclosecalls"
54 then
55 exit 0
56 fi
57 if test "$nclosecalls" -eq 0
58 then
59 exit 0
60 fi
61 # Compute number of close calls per tenth of an hour
62 nclosecalls10=`awk -v nclosecalls=$nclosecalls -v dur=$dur 'BEGIN { print int(nclosecalls * 36000 / dur) }' < /dev/null`
63 if test $nclosecalls10 -gt 5 -a $nclosecalls -gt 1
64 then
65 print_bug $nclosecalls "Reader Batch close calls in" $(($dur/60)) minute run: $i
66 else
67 print_warning $nclosecalls "Reader Batch close calls in" $(($dur/60)) minute run: $i
68 fi
51fi 69fi
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..5236e073919d 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 @@
8# 8#
9# Usage: kvm-test-1-run.sh config builddir resdir minutes qemu-args boot_args 9# Usage: kvm-test-1-run.sh config builddir resdir minutes qemu-args boot_args
10# 10#
11# qemu-args defaults to "-nographic", along with arguments specifying the 11# qemu-args defaults to "-enable-kvm -soundhw pcspk -nographic", along with
12# number of CPUs and other options generated from 12# arguments specifying the number of CPUs and other
13# the underlying CPU architecture. 13# options generated from the underlying CPU architecture.
14# boot_args defaults to value returned by the per_version_boot_params 14# boot_args defaults to value returned by the per_version_boot_params
15# shell function. 15# shell function.
16# 16#
@@ -138,7 +138,7 @@ then
138fi 138fi
139 139
140# Generate -smp qemu argument. 140# Generate -smp qemu argument.
141qemu_args="-nographic $qemu_args" 141qemu_args="-enable-kvm -soundhw pcspk -nographic $qemu_args"
142cpu_count=`configNR_CPUS.sh $config_template` 142cpu_count=`configNR_CPUS.sh $config_template`
143cpu_count=`configfrag_boot_cpus "$boot_args" "$config_template" "$cpu_count"` 143cpu_count=`configfrag_boot_cpus "$boot_args" "$config_template" "$cpu_count"`
144vcpus=`identify_qemu_vcpus` 144vcpus=`identify_qemu_vcpus`
@@ -168,6 +168,7 @@ then
168 touch $resdir/buildonly 168 touch $resdir/buildonly
169 exit 0 169 exit 0
170fi 170fi
171echo "NOTE: $QEMU either did not run or was interactive" > $builddir/console.log
171echo $QEMU $qemu_args -m 512 -kernel $resdir/bzImage -append \"$qemu_append $boot_args\" > $resdir/qemu-cmd 172echo $QEMU $qemu_args -m 512 -kernel $resdir/bzImage -append \"$qemu_append $boot_args\" > $resdir/qemu-cmd
172( $QEMU $qemu_args -m 512 -kernel $resdir/bzImage -append "$qemu_append $boot_args"; echo $? > $resdir/qemu-retval ) & 173( $QEMU $qemu_args -m 512 -kernel $resdir/bzImage -append "$qemu_append $boot_args"; echo $? > $resdir/qemu-retval ) &
173qemu_pid=$! 174qemu_pid=$!
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 @@
26# 26#
27# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> 27# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
28 28
29T=$1 29F=$1
30title=$2 30title=$2
31T=/tmp/parse-build.sh.$$
32trap 'rm -rf $T' 0
33mkdir $T
31 34
32. functions.sh 35. functions.sh
33 36
34if grep -q CC < $T 37if grep -q CC < $F
35then 38then
36 : 39 :
37else 40else
@@ -39,18 +42,21 @@ else
39 exit 1 42 exit 1
40fi 43fi
41 44
42if grep -q "error:" < $T 45if grep -q "error:" < $F
43then 46then
44 print_bug $title build errors: 47 print_bug $title build errors:
45 grep "error:" < $T 48 grep "error:" < $F
46 exit 2 49 exit 2
47fi 50fi
48exit 0
49 51
50if egrep -q "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T 52grep warning: < $F > $T/warnings
53grep "include/linux/*rcu*\.h:" $T/warnings > $T/hwarnings
54grep "kernel/rcu/[^/]*:" $T/warnings > $T/cwarnings
55cat $T/hwarnings $T/cwarnings > $T/rcuwarnings
56if test -s $T/rcuwarnings
51then 57then
52 print_warning $title build errors: 58 print_warning $title build errors:
53 egrep "rcu[^/]*\.c.*warning:|rcu.*\.h.*warning:" < $T 59 cat $T/rcuwarnings
54 exit 2 60 exit 2
55fi 61fi
56exit 0 62exit 0
diff --git a/tools/testing/selftests/rcutorture/bin/parse-console.sh b/tools/testing/selftests/rcutorture/bin/parse-console.sh
index f962ba4cf68b..d8f35cf116be 100755
--- a/tools/testing/selftests/rcutorture/bin/parse-console.sh
+++ b/tools/testing/selftests/rcutorture/bin/parse-console.sh
@@ -36,7 +36,7 @@ if grep -Pq '\x00' < $file
36then 36then
37 print_warning Console output contains nul bytes, old qemu still running? 37 print_warning Console output contains nul bytes, old qemu still running?
38fi 38fi
39egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $T 39egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:|Stall ended before state dump start' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $T
40if test -s $T 40if test -s $T
41then 41then
42 print_warning Assertion failure in $file $title 42 print_warning Assertion failure in $file $title