torture: Add refperf to the rcutorture scripting
This commit updates the rcutorture scripting to include the new refperf torture-test module. Cc: Joel Fernandes (Google) <joel@joelfernandes.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
This commit is contained in:
67
tools/testing/selftests/rcutorture/bin/kvm-recheck-refperf.sh
Executable file
67
tools/testing/selftests/rcutorture/bin/kvm-recheck-refperf.sh
Executable file
@@ -0,0 +1,67 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
|
#
|
||||||
|
# Analyze a given results directory for refperf performance measurements.
|
||||||
|
#
|
||||||
|
# Usage: kvm-recheck-refperf.sh resdir
|
||||||
|
#
|
||||||
|
# Copyright (C) IBM Corporation, 2016
|
||||||
|
#
|
||||||
|
# Authors: Paul E. McKenney <paulmck@linux.ibm.com>
|
||||||
|
|
||||||
|
i="$1"
|
||||||
|
if test -d "$i" -a -r "$i"
|
||||||
|
then
|
||||||
|
:
|
||||||
|
else
|
||||||
|
echo Unreadable results directory: $i
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
PATH=`pwd`/tools/testing/selftests/rcutorture/bin:$PATH; export PATH
|
||||||
|
. functions.sh
|
||||||
|
|
||||||
|
configfile=`echo $i | sed -e 's/^.*\///'`
|
||||||
|
|
||||||
|
sed -e 's/^\[[^]]*]//' < $i/console.log | tr -d '\015' |
|
||||||
|
awk -v configfile="$configfile" '
|
||||||
|
/^[ ]*Threads Time\(ns\) *$/ {
|
||||||
|
if (dataphase + 0 == 0) {
|
||||||
|
dataphase = 1;
|
||||||
|
# print configfile, $0;
|
||||||
|
}
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
/[^ ]*[0-9][0-9]* [0-9][0-9]*\.[0-9][0-9]*$/ {
|
||||||
|
if (dataphase == 1) {
|
||||||
|
# print $0;
|
||||||
|
readertimes[++n] = $2;
|
||||||
|
sum += $2;
|
||||||
|
}
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
if (dataphase == 1)
|
||||||
|
dataphase == 2;
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
|
||||||
|
END {
|
||||||
|
print configfile " results:";
|
||||||
|
newNR = asort(readertimes);
|
||||||
|
if (newNR <= 0) {
|
||||||
|
print "No refperf records found???"
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
medianidx = int(newNR / 2);
|
||||||
|
if (newNR == medianidx * 2)
|
||||||
|
medianvalue = (readertimes[medianidx - 1] + readertimes[medianidx]) / 2;
|
||||||
|
else
|
||||||
|
medianvalue = readertimes[medianidx];
|
||||||
|
print "Average reader duration: " sum / newNR " nanoseconds";
|
||||||
|
print "Minimum reader duration: " readertimes[1];
|
||||||
|
print "Median reader duration: " medianvalue;
|
||||||
|
print "Maximum reader duration: " readertimes[newNR];
|
||||||
|
print "Computed from refperf printk output.";
|
||||||
|
}'
|
||||||
@@ -180,13 +180,14 @@ do
|
|||||||
shift
|
shift
|
||||||
;;
|
;;
|
||||||
--torture)
|
--torture)
|
||||||
checkarg --torture "(suite name)" "$#" "$2" '^\(lock\|rcu\|rcuperf\)$' '^--'
|
checkarg --torture "(suite name)" "$#" "$2" '^\(lock\|rcu\|rcuperf\|refperf\)$' '^--'
|
||||||
TORTURE_SUITE=$2
|
TORTURE_SUITE=$2
|
||||||
shift
|
shift
|
||||||
if test "$TORTURE_SUITE" = rcuperf
|
if test "$TORTURE_SUITE" = rcuperf || test "$TORTURE_SUITE" = refperf
|
||||||
then
|
then
|
||||||
# If you really want jitter for rcuperf, specify
|
# If you really want jitter for refperf or
|
||||||
# it after specifying rcuperf. (But why?)
|
# rcuperf, specify it after specifying the rcuperf
|
||||||
|
# or the refperf. (But why jitter in these cases?)
|
||||||
jitter=0
|
jitter=0
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -33,8 +33,8 @@ then
|
|||||||
fi
|
fi
|
||||||
cat /dev/null > $file.diags
|
cat /dev/null > $file.diags
|
||||||
|
|
||||||
# Check for proper termination, except that rcuperf runs don't indicate this.
|
# Check for proper termination, except for rcuperf and refperf.
|
||||||
if test "$TORTURE_SUITE" != rcuperf
|
if test "$TORTURE_SUITE" != rcuperf && test "$TORTURE_SUITE" != refperf
|
||||||
then
|
then
|
||||||
# check for abject failure
|
# check for abject failure
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,2 @@
|
|||||||
|
NOPREEMPT
|
||||||
|
PREEMPT
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
CONFIG_RCU_REF_PERF_TEST=y
|
||||||
|
CONFIG_PRINTK_TIME=y
|
||||||
18
tools/testing/selftests/rcutorture/configs/refperf/NOPREEMPT
Normal file
18
tools/testing/selftests/rcutorture/configs/refperf/NOPREEMPT
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
CONFIG_SMP=y
|
||||||
|
CONFIG_PREEMPT_NONE=y
|
||||||
|
CONFIG_PREEMPT_VOLUNTARY=n
|
||||||
|
CONFIG_PREEMPT=n
|
||||||
|
#CHECK#CONFIG_PREEMPT_RCU=n
|
||||||
|
CONFIG_HZ_PERIODIC=n
|
||||||
|
CONFIG_NO_HZ_IDLE=y
|
||||||
|
CONFIG_NO_HZ_FULL=n
|
||||||
|
CONFIG_RCU_FAST_NO_HZ=n
|
||||||
|
CONFIG_HOTPLUG_CPU=n
|
||||||
|
CONFIG_SUSPEND=n
|
||||||
|
CONFIG_HIBERNATION=n
|
||||||
|
CONFIG_RCU_NOCB_CPU=n
|
||||||
|
CONFIG_DEBUG_LOCK_ALLOC=n
|
||||||
|
CONFIG_PROVE_LOCKING=n
|
||||||
|
CONFIG_RCU_BOOST=n
|
||||||
|
CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
|
||||||
|
CONFIG_RCU_EXPERT=y
|
||||||
18
tools/testing/selftests/rcutorture/configs/refperf/PREEMPT
Normal file
18
tools/testing/selftests/rcutorture/configs/refperf/PREEMPT
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
CONFIG_SMP=y
|
||||||
|
CONFIG_PREEMPT_NONE=n
|
||||||
|
CONFIG_PREEMPT_VOLUNTARY=n
|
||||||
|
CONFIG_PREEMPT=y
|
||||||
|
#CHECK#CONFIG_PREEMPT_RCU=y
|
||||||
|
CONFIG_HZ_PERIODIC=n
|
||||||
|
CONFIG_NO_HZ_IDLE=y
|
||||||
|
CONFIG_NO_HZ_FULL=n
|
||||||
|
CONFIG_RCU_FAST_NO_HZ=n
|
||||||
|
CONFIG_HOTPLUG_CPU=n
|
||||||
|
CONFIG_SUSPEND=n
|
||||||
|
CONFIG_HIBERNATION=n
|
||||||
|
CONFIG_RCU_NOCB_CPU=n
|
||||||
|
CONFIG_DEBUG_LOCK_ALLOC=n
|
||||||
|
CONFIG_PROVE_LOCKING=n
|
||||||
|
CONFIG_RCU_BOOST=n
|
||||||
|
CONFIG_DEBUG_OBJECTS_RCU_HEAD=n
|
||||||
|
CONFIG_RCU_EXPERT=y
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
# SPDX-License-Identifier: GPL-2.0+
|
||||||
|
#
|
||||||
|
# Torture-suite-dependent shell functions for the rest of the scripts.
|
||||||
|
#
|
||||||
|
# Copyright (C) IBM Corporation, 2015
|
||||||
|
#
|
||||||
|
# Authors: Paul E. McKenney <paulmck@linux.ibm.com>
|
||||||
|
|
||||||
|
# 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 refperf.shutdown=1 \
|
||||||
|
refperf.verbose=1
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user