Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull RCU updates from Ingo Molnar:
"Main changes:
- Torture-test changes, including refactoring of rcutorture and
introduction of a vestigial locktorture.
- Real-time latency fixes.
- Documentation updates.
- Miscellaneous fixes"
* 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (77 commits)
rcu: Provide grace-period piggybacking API
rcu: Ensure kernel/rcu/rcu.h can be sourced/used stand-alone
rcu: Fix sparse warning for rcu_expedited from kernel/ksysfs.c
notifier: Substitute rcu_access_pointer() for rcu_dereference_raw()
Documentation/memory-barriers.txt: Clarify release/acquire ordering
rcutorture: Save kvm.sh output to log
rcutorture: Add a lock_busted to test the test
rcutorture: Place kvm-test-1-run.sh output into res directory
rcutorture: Rename TREE_RCU-Kconfig.txt
locktorture: Add kvm-recheck.sh plug-in for locktorture
rcutorture: Gracefully handle NULL cleanup hooks
locktorture: Add vestigial locktorture configuration
rcutorture: Introduce "rcu" directory level underneath configs
rcutorture: Rename kvm-test-1-rcu.sh
rcutorture: Remove RCU dependencies from ver_functions.sh API
rcutorture: Create CFcommon file for common Kconfig parameters
rcutorture: Create config files for scripted test-the-test testing
rcutorture: Add an rcu_busted to test the test
locktorture: Add a lock-torture kernel module
rcutorture: Abstract kvm-recheck.sh
...
This commit is contained in:
@@ -96,6 +96,7 @@ identify_qemu () {
|
||||
echo qemu-system-ppc64
|
||||
else
|
||||
echo Cannot figure out what qemu command to use! 1>&2
|
||||
echo file $1 output: $u
|
||||
# Usually this will be one of /usr/bin/qemu-system-*
|
||||
# Use RCU_QEMU_CMD environment variable or appropriate
|
||||
# argument to top-level script.
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Analyze a given results directory for locktorture progress.
|
||||
#
|
||||
# Usage: sh kvm-recheck-lock.sh resdir
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you can access it online at
|
||||
# http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
#
|
||||
# Copyright (C) IBM Corporation, 2014
|
||||
#
|
||||
# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
|
||||
|
||||
i="$1"
|
||||
if test -d $i
|
||||
then
|
||||
:
|
||||
else
|
||||
echo Unreadable results directory: $i
|
||||
exit 1
|
||||
fi
|
||||
|
||||
configfile=`echo $i | sed -e 's/^.*\///'`
|
||||
ncs=`grep "Writes: Total:" $i/console.log 2> /dev/null | tail -1 | sed -e 's/^.* Total: //' -e 's/ .*$//'`
|
||||
if test -z "$ncs"
|
||||
then
|
||||
echo $configfile
|
||||
else
|
||||
title="$configfile ------- $ncs acquisitions/releases"
|
||||
dur=`sed -e 's/^.* locktorture.shutdown_secs=//' -e 's/ .*$//' < $i/qemu-cmd 2> /dev/null`
|
||||
if test -z "$dur"
|
||||
then
|
||||
:
|
||||
else
|
||||
ncsps=`awk -v ncs=$ncs -v dur=$dur '
|
||||
BEGIN { print ncs / dur }' < /dev/null`
|
||||
title="$title ($ncsps per second)"
|
||||
fi
|
||||
echo $title
|
||||
fi
|
||||
@@ -0,0 +1,51 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Analyze a given results directory for rcutorture progress.
|
||||
#
|
||||
# Usage: sh kvm-recheck-rcu.sh resdir
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you can access it online at
|
||||
# http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
#
|
||||
# Copyright (C) IBM Corporation, 2014
|
||||
#
|
||||
# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
|
||||
|
||||
i="$1"
|
||||
if test -d $i
|
||||
then
|
||||
:
|
||||
else
|
||||
echo Unreadable results directory: $i
|
||||
exit 1
|
||||
fi
|
||||
|
||||
configfile=`echo $i | sed -e 's/^.*\///'`
|
||||
ngps=`grep ver: $i/console.log 2> /dev/null | tail -1 | sed -e 's/^.* ver: //' -e 's/ .*$//'`
|
||||
if test -z "$ngps"
|
||||
then
|
||||
echo $configfile
|
||||
else
|
||||
title="$configfile ------- $ngps grace periods"
|
||||
dur=`sed -e 's/^.* rcutorture.shutdown_secs=//' -e 's/ .*$//' < $i/qemu-cmd 2> /dev/null`
|
||||
if test -z "$dur"
|
||||
then
|
||||
:
|
||||
else
|
||||
ngpsps=`awk -v ngps=$ngps -v dur=$dur '
|
||||
BEGIN { print ngps / dur }' < /dev/null`
|
||||
title="$title ($ngpsps per second)"
|
||||
fi
|
||||
echo $title
|
||||
fi
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Given the results directories for previous KVM runs of rcutorture,
|
||||
# Given the results directories for previous KVM-based torture runs,
|
||||
# check the build and console output for errors. Given a directory
|
||||
# containing results directories, this recursively checks them all.
|
||||
#
|
||||
@@ -27,11 +27,18 @@
|
||||
PATH=`pwd`/tools/testing/selftests/rcutorture/bin:$PATH; export PATH
|
||||
for rd in "$@"
|
||||
do
|
||||
firsttime=1
|
||||
dirs=`find $rd -name Make.defconfig.out -print | sort | sed -e 's,/[^/]*$,,' | sort -u`
|
||||
for i in $dirs
|
||||
do
|
||||
configfile=`echo $i | sed -e 's/^.*\///'`
|
||||
echo $configfile
|
||||
if test -n "$firsttime"
|
||||
then
|
||||
firsttime=""
|
||||
resdir=`echo $i | sed -e 's,/$,,' -e 's,/[^/]*$,,'`
|
||||
head -1 $resdir/log
|
||||
fi
|
||||
TORTURE_SUITE="`cat $i/../TORTURE_SUITE`"
|
||||
kvm-recheck-${TORTURE_SUITE}.sh $i
|
||||
configcheck.sh $i/.config $i/ConfigFragment
|
||||
parse-build.sh $i/Make.out $configfile
|
||||
parse-rcutorture.sh $i/console.log $configfile
|
||||
|
||||
+32
-21
@@ -6,15 +6,15 @@
|
||||
# Execute this in the source tree. Do not run it as a background task
|
||||
# because qemu does not seem to like that much.
|
||||
#
|
||||
# Usage: sh kvm-test-1-rcu.sh config builddir resdir minutes qemu-args bootargs
|
||||
# Usage: sh kvm-test-1-run.sh config builddir resdir minutes qemu-args boot_args
|
||||
#
|
||||
# qemu-args defaults to "" -- you will want "-nographic" if running headless.
|
||||
# bootargs defaults to "root=/dev/sda noapic selinux=0 console=ttyS0"
|
||||
# "initcall_debug debug rcutorture.stat_interval=15"
|
||||
# "rcutorture.shutdown_secs=$((minutes * 60))"
|
||||
# "rcutorture.rcutorture_runnable=1"
|
||||
# qemu-args defaults to "-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.
|
||||
#
|
||||
# Anything you specify for either qemu-args or bootargs is appended to
|
||||
# Anything you specify for either qemu-args or boot_args is appended to
|
||||
# the default values. The "-smp" value is deduced from the contents of
|
||||
# the config fragment.
|
||||
#
|
||||
@@ -40,32 +40,34 @@
|
||||
|
||||
grace=120
|
||||
|
||||
T=/tmp/kvm-test-1-rcu.sh.$$
|
||||
T=/tmp/kvm-test-1-run.sh.$$
|
||||
trap 'rm -rf $T' 0
|
||||
|
||||
. $KVM/bin/functions.sh
|
||||
. $KVPATH/ver_functions.sh
|
||||
|
||||
config_template=${1}
|
||||
config_dir=`echo $config_template | sed -e 's,/[^/]*$,,'`
|
||||
title=`echo $config_template | sed -e 's/^.*\///'`
|
||||
builddir=${2}
|
||||
if test -z "$builddir" -o ! -d "$builddir" -o ! -w "$builddir"
|
||||
then
|
||||
echo "kvm-test-1-rcu.sh :$builddir: Not a writable directory, cannot build into it"
|
||||
echo "kvm-test-1-run.sh :$builddir: Not a writable directory, cannot build into it"
|
||||
exit 1
|
||||
fi
|
||||
resdir=${3}
|
||||
if test -z "$resdir" -o ! -d "$resdir" -o ! -w "$resdir"
|
||||
then
|
||||
echo "kvm-test-1-rcu.sh :$resdir: Not a writable directory, cannot build into it"
|
||||
echo "kvm-test-1-run.sh :$resdir: Not a writable directory, cannot store results into it"
|
||||
exit 1
|
||||
fi
|
||||
cp $config_template $resdir/ConfigFragment
|
||||
echo ' ---' `date`: Starting build
|
||||
echo ' ---' Kconfig fragment at: $config_template >> $resdir/log
|
||||
cat << '___EOF___' >> $T
|
||||
CONFIG_RCU_TORTURE_TEST=y
|
||||
___EOF___
|
||||
if test -r "$config_dir/CFcommon"
|
||||
then
|
||||
cat < $config_dir/CFcommon >> $T
|
||||
fi
|
||||
# Optimizations below this point
|
||||
# CONFIG_USB=n
|
||||
# CONFIG_SECURITY=n
|
||||
@@ -96,11 +98,23 @@ then
|
||||
cp $builddir/.config $resdir
|
||||
cp $builddir/arch/x86/boot/bzImage $resdir
|
||||
parse-build.sh $resdir/Make.out $title
|
||||
if test -f $builddir.wait
|
||||
then
|
||||
mv $builddir.wait $builddir.ready
|
||||
fi
|
||||
else
|
||||
cp $builddir/Make*.out $resdir
|
||||
echo Build failed, not running KVM, see $resdir.
|
||||
if test -f $builddir.wait
|
||||
then
|
||||
mv $builddir.wait $builddir.ready
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
while test -f $builddir.ready
|
||||
do
|
||||
sleep 1
|
||||
done
|
||||
minutes=$4
|
||||
seconds=$(($minutes * 60))
|
||||
qemu_args=$5
|
||||
@@ -111,9 +125,10 @@ kstarttime=`awk 'BEGIN { print systime() }' < /dev/null`
|
||||
echo ' ---' `date`: Starting kernel
|
||||
|
||||
# Determine the appropriate flavor of qemu command.
|
||||
QEMU="`identify_qemu $builddir/vmlinux.o`"
|
||||
QEMU="`identify_qemu $builddir/vmlinux`"
|
||||
|
||||
# Generate -smp qemu argument.
|
||||
qemu_args="-nographic $qemu_args"
|
||||
cpu_count=`configNR_CPUS.sh $config_template`
|
||||
vcpus=`identify_qemu_vcpus`
|
||||
if test $cpu_count -gt $vcpus
|
||||
@@ -133,12 +148,8 @@ qemu_append="`identify_qemu_append "$QEMU"`"
|
||||
|
||||
# Pull in Kconfig-fragment boot parameters
|
||||
boot_args="`configfrag_boot_params "$boot_args" "$config_template"`"
|
||||
# Generate CPU-hotplug boot parameters
|
||||
boot_args="`rcutorture_param_onoff "$boot_args" $builddir/.config`"
|
||||
# Generate rcu_barrier() boot parameter
|
||||
boot_args="`rcutorture_param_n_barrier_cbs "$boot_args"`"
|
||||
# Pull in standard rcutorture boot arguments
|
||||
boot_args="$boot_args rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1"
|
||||
# Generate kernel-version-specific boot parameters
|
||||
boot_args="`per_version_boot_params "$boot_args" $builddir/.config $seconds`"
|
||||
|
||||
echo $QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"$qemu_append $boot_args\" > $resdir/qemu-cmd
|
||||
if test -n "$RCU_BUILDONLY"
|
||||
@@ -188,5 +199,5 @@ then
|
||||
fi
|
||||
|
||||
cp $builddir/console.log $resdir
|
||||
parse-rcutorture.sh $resdir/console.log $title
|
||||
parse-${TORTURE_SUITE}torture.sh $resdir/console.log $title
|
||||
parse-console.sh $resdir/console.log $title
|
||||
@@ -30,14 +30,21 @@
|
||||
scriptname=$0
|
||||
args="$*"
|
||||
|
||||
T=/tmp/kvm.sh.$$
|
||||
trap 'rm -rf $T' 0
|
||||
mkdir $T
|
||||
|
||||
dur=30
|
||||
dryrun=""
|
||||
KVM="`pwd`/tools/testing/selftests/rcutorture"; export KVM
|
||||
PATH=${KVM}/bin:$PATH; export PATH
|
||||
builddir="${KVM}/b1"
|
||||
RCU_INITRD="$KVM/initrd"; export RCU_INITRD
|
||||
RCU_KMAKE_ARG=""; export RCU_KMAKE_ARG
|
||||
TORTURE_SUITE=rcu
|
||||
resdir=""
|
||||
configs=""
|
||||
cpus=0
|
||||
ds=`date +%Y.%m.%d-%H:%M:%S`
|
||||
kversion=""
|
||||
|
||||
@@ -49,7 +56,9 @@ usage () {
|
||||
echo " --builddir absolute-pathname"
|
||||
echo " --buildonly"
|
||||
echo " --configs \"config-file list\""
|
||||
echo " --cpus N"
|
||||
echo " --datestamp string"
|
||||
echo " --dryrun sched|script"
|
||||
echo " --duration minutes"
|
||||
echo " --interactive"
|
||||
echo " --kmake-arg kernel-make-arguments"
|
||||
@@ -58,8 +67,9 @@ usage () {
|
||||
echo " --no-initrd"
|
||||
echo " --qemu-args qemu-system-..."
|
||||
echo " --qemu-cmd qemu-system-..."
|
||||
echo " --results absolute-pathname"
|
||||
echo " --relbuilddir relative-pathname"
|
||||
echo " --results absolute-pathname"
|
||||
echo " --torture rcu"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -85,11 +95,21 @@ do
|
||||
configs="$2"
|
||||
shift
|
||||
;;
|
||||
--cpus)
|
||||
checkarg --cpus "(number)" "$#" "$2" '^[0-9]*$' '^--'
|
||||
cpus=$2
|
||||
shift
|
||||
;;
|
||||
--datestamp)
|
||||
checkarg --datestamp "(relative pathname)" "$#" "$2" '^[^/]*$' '^--'
|
||||
ds=$2
|
||||
shift
|
||||
;;
|
||||
--dryrun)
|
||||
checkarg --dryrun "sched|script" $# "$2" 'sched\|script' '^--'
|
||||
dryrun=$2
|
||||
shift
|
||||
;;
|
||||
--duration)
|
||||
checkarg --duration "(minutes)" $# "$2" '^[0-9]*$' '^error'
|
||||
dur=$2
|
||||
@@ -138,6 +158,11 @@ do
|
||||
resdir=$2
|
||||
shift
|
||||
;;
|
||||
--torture)
|
||||
checkarg --torture "(suite name)" "$#" "$2" '^\(lock\|rcu\)$' '^--'
|
||||
TORTURE_SUITE=$2
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
echo Unknown argument $1
|
||||
usage
|
||||
@@ -146,7 +171,7 @@ do
|
||||
shift
|
||||
done
|
||||
|
||||
CONFIGFRAG=${KVM}/configs; export CONFIGFRAG
|
||||
CONFIGFRAG=${KVM}/configs/${TORTURE_SUITE}; export CONFIGFRAG
|
||||
KVPATH=${CONFIGFRAG}/$kversion; export KVPATH
|
||||
|
||||
if test -z "$configs"
|
||||
@@ -157,54 +182,231 @@ fi
|
||||
if test -z "$resdir"
|
||||
then
|
||||
resdir=$KVM/res
|
||||
if ! test -e $resdir
|
||||
then
|
||||
mkdir $resdir || :
|
||||
fi
|
||||
else
|
||||
fi
|
||||
|
||||
if test "$dryrun" = ""
|
||||
then
|
||||
if ! test -e $resdir
|
||||
then
|
||||
mkdir -p "$resdir" || :
|
||||
fi
|
||||
fi
|
||||
mkdir $resdir/$ds
|
||||
touch $resdir/$ds/log
|
||||
echo $scriptname $args >> $resdir/$ds/log
|
||||
mkdir $resdir/$ds
|
||||
|
||||
pwd > $resdir/$ds/testid.txt
|
||||
if test -d .git
|
||||
then
|
||||
git status >> $resdir/$ds/testid.txt
|
||||
git rev-parse HEAD >> $resdir/$ds/testid.txt
|
||||
fi
|
||||
builddir=$KVM/b1
|
||||
if ! test -e $builddir
|
||||
then
|
||||
mkdir $builddir || :
|
||||
# Be noisy only if running the script.
|
||||
echo Results directory: $resdir/$ds
|
||||
echo $scriptname $args
|
||||
|
||||
touch $resdir/$ds/log
|
||||
echo $scriptname $args >> $resdir/$ds/log
|
||||
echo ${TORTURE_SUITE} > $resdir/$ds/TORTURE_SUITE
|
||||
|
||||
pwd > $resdir/$ds/testid.txt
|
||||
if test -d .git
|
||||
then
|
||||
git status >> $resdir/$ds/testid.txt
|
||||
git rev-parse HEAD >> $resdir/$ds/testid.txt
|
||||
fi
|
||||
fi
|
||||
|
||||
# Create a file of test-name/#cpus pairs, sorted by decreasing #cpus.
|
||||
touch $T/cfgcpu
|
||||
for CF in $configs
|
||||
do
|
||||
# Running TREE01 multiple times creates TREE01, TREE01.2, TREE01.3, ...
|
||||
rd=$resdir/$ds/$CF
|
||||
if test -d "${rd}"
|
||||
if test -f "$CONFIGFRAG/$kversion/$CF"
|
||||
then
|
||||
n="`ls -d "${rd}"* | grep '\.[0-9]\+$' |
|
||||
sed -e 's/^.*\.\([0-9]\+\)/\1/' |
|
||||
sort -k1n | tail -1`"
|
||||
if test -z "$n"
|
||||
then
|
||||
rd="${rd}.2"
|
||||
else
|
||||
n="`expr $n + 1`"
|
||||
rd="${rd}.${n}"
|
||||
fi
|
||||
echo $CF `configNR_CPUS.sh $CONFIGFRAG/$kversion/$CF` >> $T/cfgcpu
|
||||
else
|
||||
echo "The --configs file $CF does not exist, terminating."
|
||||
exit 1
|
||||
fi
|
||||
mkdir "${rd}"
|
||||
echo Results directory: $rd
|
||||
kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic $RCU_QEMU_ARG" "rcutorture.test_no_idle_hz=1 rcutorture.verbose=1 $RCU_BOOTARGS"
|
||||
done
|
||||
sort -k2nr $T/cfgcpu > $T/cfgcpu.sort
|
||||
|
||||
# Use a greedy bin-packing algorithm, sorting the list accordingly.
|
||||
awk < $T/cfgcpu.sort > $T/cfgcpu.pack -v ncpus=$cpus '
|
||||
BEGIN {
|
||||
njobs = 0;
|
||||
}
|
||||
|
||||
{
|
||||
# Read file of tests and corresponding required numbers of CPUs.
|
||||
cf[njobs] = $1;
|
||||
cpus[njobs] = $2;
|
||||
njobs++;
|
||||
}
|
||||
|
||||
END {
|
||||
alldone = 0;
|
||||
batch = 0;
|
||||
nc = -1;
|
||||
|
||||
# Each pass through the following loop creates on test batch
|
||||
# that can be executed concurrently given ncpus. Note that a
|
||||
# given test that requires more than the available CPUs will run in
|
||||
# their own batch. Such tests just have to make do with what
|
||||
# is available.
|
||||
while (nc != ncpus) {
|
||||
batch++;
|
||||
nc = ncpus;
|
||||
|
||||
# Each pass through the following loop considers one
|
||||
# test for inclusion in the current batch.
|
||||
for (i = 0; i < njobs; i++) {
|
||||
if (done[i])
|
||||
continue; # Already part of a batch.
|
||||
if (nc >= cpus[i] || nc == ncpus) {
|
||||
|
||||
# This test fits into the current batch.
|
||||
done[i] = batch;
|
||||
nc -= cpus[i];
|
||||
if (nc <= 0)
|
||||
break; # Too-big test in its own batch.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Dump out the tests in batch order.
|
||||
for (b = 1; b <= batch; b++)
|
||||
for (i = 0; i < njobs; i++)
|
||||
if (done[i] == b)
|
||||
print cf[i], cpus[i];
|
||||
}'
|
||||
|
||||
# Generate a script to execute the tests in appropriate batches.
|
||||
cat << ___EOF___ > $T/script
|
||||
TORTURE_SUITE="$TORTURE_SUITE"; export TORTURE_SUITE
|
||||
___EOF___
|
||||
awk < $T/cfgcpu.pack \
|
||||
-v CONFIGDIR="$CONFIGFRAG/$kversion/" \
|
||||
-v KVM="$KVM" \
|
||||
-v ncpus=$cpus \
|
||||
-v rd=$resdir/$ds/ \
|
||||
-v dur=$dur \
|
||||
-v RCU_QEMU_ARG=$RCU_QEMU_ARG \
|
||||
-v RCU_BOOTARGS=$RCU_BOOTARGS \
|
||||
'BEGIN {
|
||||
i = 0;
|
||||
}
|
||||
|
||||
{
|
||||
cf[i] = $1;
|
||||
cpus[i] = $2;
|
||||
i++;
|
||||
}
|
||||
|
||||
# Dump out the scripting required to run one test batch.
|
||||
function dump(first, pastlast)
|
||||
{
|
||||
print "echo ----Start batch: `date`";
|
||||
print "echo ----Start batch: `date` >> " rd "/log";
|
||||
jn=1
|
||||
for (j = first; j < pastlast; j++) {
|
||||
builddir=KVM "/b" jn
|
||||
cpusr[jn] = cpus[j];
|
||||
if (cfrep[cf[j]] == "") {
|
||||
cfr[jn] = cf[j];
|
||||
cfrep[cf[j]] = 1;
|
||||
} else {
|
||||
cfrep[cf[j]]++;
|
||||
cfr[jn] = cf[j] "." cfrep[cf[j]];
|
||||
}
|
||||
if (cpusr[jn] > ncpus && ncpus != 0)
|
||||
ovf = "(!)";
|
||||
else
|
||||
ovf = "";
|
||||
print "echo ", cfr[jn], cpusr[jn] ovf ": Starting build. `date`";
|
||||
print "echo ", cfr[jn], cpusr[jn] ovf ": Starting build. `date` >> " rd "/log";
|
||||
print "rm -f " builddir ".*";
|
||||
print "touch " builddir ".wait";
|
||||
print "mkdir " builddir " > /dev/null 2>&1 || :";
|
||||
print "mkdir " rd cfr[jn] " || :";
|
||||
print "kvm-test-1-run.sh " CONFIGDIR cf[j], builddir, rd cfr[jn], dur " \"" RCU_QEMU_ARG "\" \"" RCU_BOOTARGS "\" > " rd cfr[jn] "/kvm-test-1-run.sh.out 2>&1 &"
|
||||
print "echo ", cfr[jn], cpusr[jn] ovf ": Waiting for build to complete. `date`";
|
||||
print "echo ", cfr[jn], cpusr[jn] ovf ": Waiting for build to complete. `date` >> " rd "/log";
|
||||
print "while test -f " builddir ".wait"
|
||||
print "do"
|
||||
print "\tsleep 1"
|
||||
print "done"
|
||||
print "echo ", cfr[jn], cpusr[jn] ovf ": Build complete. `date`";
|
||||
print "echo ", cfr[jn], cpusr[jn] ovf ": Build complete. `date` >> " rd "/log";
|
||||
jn++;
|
||||
}
|
||||
for (j = 1; j < jn; j++) {
|
||||
builddir=KVM "/b" j
|
||||
print "rm -f " builddir ".ready"
|
||||
print "echo ----", cfr[j], cpusr[j] ovf ": Starting kernel. `date`";
|
||||
print "echo ----", cfr[j], cpusr[j] ovf ": Starting kernel. `date` >> " rd "/log";
|
||||
}
|
||||
print "wait"
|
||||
print "echo ---- All kernel runs complete. `date`";
|
||||
print "echo ---- All kernel runs complete. `date` >> " rd "/log";
|
||||
for (j = 1; j < jn; j++) {
|
||||
builddir=KVM "/b" j
|
||||
print "echo ----", cfr[j], cpusr[j] ovf ": Build/run results:";
|
||||
print "echo ----", cfr[j], cpusr[j] ovf ": Build/run results: >> " rd "/log";
|
||||
print "cat " rd cfr[j] "/kvm-test-1-run.sh.out";
|
||||
print "cat " rd cfr[j] "/kvm-test-1-run.sh.out >> " rd "/log";
|
||||
}
|
||||
}
|
||||
|
||||
END {
|
||||
njobs = i;
|
||||
nc = ncpus;
|
||||
first = 0;
|
||||
|
||||
# Each pass through the following loop considers one test.
|
||||
for (i = 0; i < njobs; i++) {
|
||||
if (ncpus == 0) {
|
||||
# Sequential test specified, each test its own batch.
|
||||
dump(i, i + 1);
|
||||
first = i;
|
||||
} else if (nc < cpus[i] && i != 0) {
|
||||
# Out of CPUs, dump out a batch.
|
||||
dump(first, i);
|
||||
first = i;
|
||||
nc = ncpus;
|
||||
}
|
||||
# Account for the CPUs needed by the current test.
|
||||
nc -= cpus[i];
|
||||
}
|
||||
# Dump the last batch.
|
||||
if (ncpus != 0)
|
||||
dump(first, i);
|
||||
}' >> $T/script
|
||||
|
||||
if test "$dryrun" = script
|
||||
then
|
||||
# Dump out the script, but define the environment variables that
|
||||
# it needs to run standalone.
|
||||
echo CONFIGFRAG="$CONFIGFRAG; export CONFIGFRAG"
|
||||
echo KVM="$KVM; export KVM"
|
||||
echo KVPATH="$KVPATH; export KVPATH"
|
||||
echo PATH="$PATH; export PATH"
|
||||
echo RCU_BUILDONLY="$RCU_BUILDONLY; export RCU_BUILDONLY"
|
||||
echo RCU_INITRD="$RCU_INITRD; export RCU_INITRD"
|
||||
echo RCU_KMAKE_ARG="$RCU_KMAKE_ARG; export RCU_KMAKE_ARG"
|
||||
echo RCU_QEMU_CMD="$RCU_QEMU_CMD; export RCU_QEMU_CMD"
|
||||
echo RCU_QEMU_INTERACTIVE="$RCU_QEMU_INTERACTIVE; export RCU_QEMU_INTERACTIVE"
|
||||
echo RCU_QEMU_MAC="$RCU_QEMU_MAC; export RCU_QEMU_MAC"
|
||||
echo "mkdir -p "$resdir" || :"
|
||||
echo "mkdir $resdir/$ds"
|
||||
cat $T/script
|
||||
exit 0
|
||||
elif test "$dryrun" = sched
|
||||
then
|
||||
# Extract the test run schedule from the script.
|
||||
egrep 'start batch|Starting build\.' $T/script |
|
||||
sed -e 's/:.*$//' -e 's/^echo //'
|
||||
exit 0
|
||||
else
|
||||
# Not a dryru, so run the script.
|
||||
sh $T/script
|
||||
fi
|
||||
|
||||
# Tracing: trace_event=rcu:rcu_grace_period,rcu:rcu_future_grace_period,rcu:rcu_grace_period_init,rcu:rcu_nocb_wake,rcu:rcu_preempt_task,rcu:rcu_unlock_preempted_task,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_kfree_callback,rcu:rcu_batch_start,rcu:rcu_invoke_callback,rcu:rcu_invoke_kfree_callback,rcu:rcu_batch_end,rcu:rcu_torture_read,rcu:rcu_barrier
|
||||
|
||||
echo
|
||||
echo
|
||||
echo " --- `date` Test summary:"
|
||||
echo Results directory: $resdir/$ds
|
||||
kvm-recheck.sh $resdir/$ds
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_PREEMPT_NONE=n
|
||||
CONFIG_PREEMPT_VOLUNTARY=n
|
||||
CONFIG_PREEMPT=y
|
||||
@@ -0,0 +1 @@
|
||||
locktorture.torture_type=lock_busted
|
||||
@@ -0,0 +1 @@
|
||||
LOCK01
|
||||
@@ -0,0 +1,2 @@
|
||||
CONFIG_LOCK_TORTURE_TEST=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
@@ -0,0 +1,6 @@
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=8
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_PREEMPT_NONE=n
|
||||
CONFIG_PREEMPT_VOLUNTARY=n
|
||||
CONFIG_PREEMPT=y
|
||||
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Kernel-version-dependent shell functions for the rest of the scripts.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, you can access it online at
|
||||
# http://www.gnu.org/licenses/gpl-2.0.html.
|
||||
#
|
||||
# Copyright (C) IBM Corporation, 2014
|
||||
#
|
||||
# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
|
||||
|
||||
# locktorture_param_onoff bootparam-string config-file
|
||||
#
|
||||
# Adds onoff locktorture module parameters to kernels having it.
|
||||
locktorture_param_onoff () {
|
||||
if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2"
|
||||
then
|
||||
echo CPU-hotplug kernel, adding locktorture onoff. 1>&2
|
||||
echo locktorture.onoff_interval=3 locktorture.onoff_holdoff=30
|
||||
fi
|
||||
}
|
||||
|
||||
# per_version_boot_params bootparam-string config-file seconds
|
||||
#
|
||||
# Adds per-version torture-module parameters to kernels supporting them.
|
||||
per_version_boot_params () {
|
||||
echo $1 `locktorture_param_onoff "$1" "$2"` \
|
||||
locktorture.stat_interval=15 \
|
||||
locktorture.shutdown_secs=$3 \
|
||||
locktorture.locktorture_runnable=1 \
|
||||
locktorture.verbose=1
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
CONFIG_RCU_TRACE=n
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_PREEMPT_NONE=n
|
||||
CONFIG_PREEMPT_VOLUNTARY=n
|
||||
CONFIG_PREEMPT=y
|
||||
@@ -0,0 +1 @@
|
||||
rcutorture.torture_type=rcu_busted
|
||||
@@ -0,0 +1,2 @@
|
||||
CONFIG_RCU_TORTURE_TEST=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
+1
-2
@@ -1,8 +1,7 @@
|
||||
CONFIG_RCU_TRACE=n
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=8
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_PREEMPT_NONE=y
|
||||
CONFIG_PREEMPT_VOLUNTARY=n
|
||||
CONFIG_PREEMPT=n
|
||||
CONFIG_PRINTK_TIME=y
|
||||
-1
@@ -5,4 +5,3 @@ CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_PREEMPT_NONE=n
|
||||
CONFIG_PREEMPT_VOLUNTARY=n
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
-1
@@ -10,4 +10,3 @@ CONFIG_RCU_TRACE=n
|
||||
CONFIG_DEBUG_LOCK_ALLOC=n
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
|
||||
CONFIG_PREEMPT_COUNT=n
|
||||
CONFIG_PRINTK_TIME=y
|
||||
-1
@@ -10,4 +10,3 @@ CONFIG_RCU_TRACE=y
|
||||
CONFIG_DEBUG_LOCK_ALLOC=y
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
|
||||
CONFIG_PREEMPT_COUNT=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
-1
@@ -20,4 +20,3 @@ CONFIG_RCU_CPU_STALL_INFO=n
|
||||
CONFIG_RCU_CPU_STALL_VERBOSE=n
|
||||
CONFIG_RCU_BOOST=n
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
|
||||
CONFIG_PRINTK_TIME=y
|
||||
+1
-2
@@ -7,7 +7,7 @@ CONFIG_PREEMPT=y
|
||||
CONFIG_HZ_PERIODIC=n
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_NO_HZ_FULL=n
|
||||
CONFIG_RCU_FAST_NO_HZ=n
|
||||
CONFIG_RCU_FAST_NO_HZ=n
|
||||
CONFIG_RCU_TRACE=n
|
||||
CONFIG_HOTPLUG_CPU=n
|
||||
CONFIG_SUSPEND=n
|
||||
@@ -23,4 +23,3 @@ CONFIG_RCU_CPU_STALL_INFO=n
|
||||
CONFIG_RCU_CPU_STALL_VERBOSE=y
|
||||
CONFIG_RCU_BOOST=n
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
|
||||
CONFIG_PRINTK_TIME=y
|
||||
-1
@@ -20,4 +20,3 @@ CONFIG_RCU_CPU_STALL_VERBOSE=n
|
||||
CONFIG_RCU_BOOST=y
|
||||
CONFIG_RCU_BOOST_PRIO=2
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
|
||||
CONFIG_PRINTK_TIME=y
|
||||
-1
@@ -22,4 +22,3 @@ CONFIG_PROVE_RCU_DELAY=n
|
||||
CONFIG_RCU_CPU_STALL_INFO=y
|
||||
CONFIG_RCU_CPU_STALL_VERBOSE=y
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
|
||||
CONFIG_PRINTK_TIME=y
|
||||
-1
@@ -22,4 +22,3 @@ CONFIG_PROVE_RCU_DELAY=y
|
||||
CONFIG_RCU_CPU_STALL_INFO=n
|
||||
CONFIG_RCU_CPU_STALL_VERBOSE=n
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
|
||||
CONFIG_PRINTK_TIME=y
|
||||
-1
@@ -23,4 +23,3 @@ CONFIG_PROVE_RCU_DELAY=n
|
||||
CONFIG_RCU_CPU_STALL_INFO=n
|
||||
CONFIG_RCU_CPU_STALL_VERBOSE=n
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
-1
@@ -21,4 +21,3 @@ CONFIG_PROVE_RCU_DELAY=n
|
||||
CONFIG_RCU_CPU_STALL_INFO=y
|
||||
CONFIG_RCU_CPU_STALL_VERBOSE=n
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
|
||||
CONFIG_PRINTK_TIME=y
|
||||
-1
@@ -23,4 +23,3 @@ CONFIG_RCU_CPU_STALL_INFO=n
|
||||
CONFIG_RCU_CPU_STALL_VERBOSE=n
|
||||
CONFIG_RCU_BOOST=n
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
|
||||
CONFIG_PRINTK_TIME=y
|
||||
-1
@@ -23,4 +23,3 @@ CONFIG_RCU_CPU_STALL_INFO=n
|
||||
CONFIG_RCU_CPU_STALL_VERBOSE=n
|
||||
CONFIG_RCU_BOOST=n
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
|
||||
CONFIG_PRINTK_TIME=y
|
||||
-1
@@ -18,4 +18,3 @@ CONFIG_RCU_CPU_STALL_INFO=n
|
||||
CONFIG_RCU_CPU_STALL_VERBOSE=n
|
||||
CONFIG_RCU_BOOST=n
|
||||
CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
|
||||
CONFIG_PRINTK_TIME=y
|
||||
+9
-11
@@ -20,16 +20,14 @@
|
||||
#
|
||||
# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
|
||||
|
||||
# rcutorture_param_n_barrier_cbs bootparam-string
|
||||
# per_version_boot_params bootparam-string config-file seconds
|
||||
#
|
||||
# Adds n_barrier_cbs rcutorture module parameter to kernels having it.
|
||||
rcutorture_param_n_barrier_cbs () {
|
||||
echo $1
|
||||
}
|
||||
|
||||
# rcutorture_param_onoff bootparam-string config-file
|
||||
#
|
||||
# Adds onoff rcutorture module parameters to kernels having it.
|
||||
rcutorture_param_onoff () {
|
||||
echo $1
|
||||
# Adds per-version torture-module parameters to kernels supporting them.
|
||||
# Which old kernels do not.
|
||||
per_version_boot_params () {
|
||||
echo rcutorture.stat_interval=15 \
|
||||
rcutorture.shutdown_secs=$3 \
|
||||
rcutorture.rcutorture_runnable=1 \
|
||||
rcutorture.test_no_idle_hz=1 \
|
||||
rcutorture.verbose=1
|
||||
}
|
||||
+13
-15
@@ -20,18 +20,6 @@
|
||||
#
|
||||
# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
|
||||
|
||||
# rcutorture_param_n_barrier_cbs bootparam-string
|
||||
#
|
||||
# Adds n_barrier_cbs rcutorture module parameter to kernels having it.
|
||||
rcutorture_param_n_barrier_cbs () {
|
||||
if echo $1 | grep -q "rcutorture\.n_barrier_cbs"
|
||||
then
|
||||
echo $1
|
||||
else
|
||||
echo $1 rcutorture.n_barrier_cbs=4
|
||||
fi
|
||||
}
|
||||
|
||||
# rcutorture_param_onoff bootparam-string config-file
|
||||
#
|
||||
# Adds onoff rcutorture module parameters to kernels having it.
|
||||
@@ -39,8 +27,18 @@ rcutorture_param_onoff () {
|
||||
if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2"
|
||||
then
|
||||
echo CPU-hotplug kernel, adding rcutorture onoff. 1>&2
|
||||
echo $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30
|
||||
else
|
||||
echo $1
|
||||
echo rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30
|
||||
fi
|
||||
}
|
||||
|
||||
# per_version_boot_params bootparam-string config-file seconds
|
||||
#
|
||||
# Adds per-version torture-module parameters to kernels supporting them.
|
||||
per_version_boot_params () {
|
||||
echo $1 `rcutorture_param_onoff "$1" "$2"` \
|
||||
rcutorture.stat_interval=15 \
|
||||
rcutorture.shutdown_secs=$3 \
|
||||
rcutorture.rcutorture_runnable=1 \
|
||||
rcutorture.test_no_idle_hz=1 \
|
||||
rcutorture.verbose=1
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user