mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 21:54:11 +08:00
rcutorture: Remove RCU dependencies from ver_functions.sh API
The current set of functions in ver_functions.sh have APIs that are specific to RCU. This commit therefore makes an RCU-independent function that outputs version-specific boot arguments. This has the benefit that a test-type-independent call in kvm-test-1-rcu.sh can now handle any type of test, given a test-type-specific set of files in a configs directory. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org>
This commit is contained in:
parent
d2ebf7eea0
commit
a5afdeb13c
@ -148,12 +148,8 @@ qemu_append="`identify_qemu_append "$QEMU"`"
|
|||||||
|
|
||||||
# Pull in Kconfig-fragment boot parameters
|
# Pull in Kconfig-fragment boot parameters
|
||||||
boot_args="`configfrag_boot_params "$boot_args" "$config_template"`"
|
boot_args="`configfrag_boot_params "$boot_args" "$config_template"`"
|
||||||
# Generate CPU-hotplug boot parameters
|
# Generate kernel-version-specific boot parameters
|
||||||
boot_args="`rcutorture_param_onoff "$boot_args" $builddir/.config`"
|
boot_args="`per_version_boot_params "$boot_args" $builddir/.config $seconds`"
|
||||||
# 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 rcutorture.test_no_idle_hz=1 rcutorture.verbose=1"
|
|
||||||
|
|
||||||
echo $QEMU $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"$qemu_append $boot_args\" > $resdir/qemu-cmd
|
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"
|
if test -n "$RCU_BUILDONLY"
|
||||||
|
@ -20,16 +20,14 @@
|
|||||||
#
|
#
|
||||||
# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
|
# 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.
|
# Adds per-version torture-module parameters to kernels supporting them.
|
||||||
rcutorture_param_n_barrier_cbs () {
|
# Which old kernels do not.
|
||||||
echo $1
|
per_version_boot_params () {
|
||||||
}
|
echo rcutorture.stat_interval=15 \
|
||||||
|
rcutorture.shutdown_secs=$3 \
|
||||||
# rcutorture_param_onoff bootparam-string config-file
|
rcutorture.rcutorture_runnable=1 \
|
||||||
#
|
rcutorture.test_no_idle_hz=1 \
|
||||||
# Adds onoff rcutorture module parameters to kernels having it.
|
rcutorture.verbose=1
|
||||||
rcutorture_param_onoff () {
|
|
||||||
echo $1
|
|
||||||
}
|
}
|
||||||
|
@ -20,22 +20,25 @@
|
|||||||
#
|
#
|
||||||
# Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
|
# 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 () {
|
|
||||||
echo $1
|
|
||||||
}
|
|
||||||
|
|
||||||
# rcutorture_param_onoff bootparam-string config-file
|
# rcutorture_param_onoff bootparam-string config-file
|
||||||
#
|
#
|
||||||
# Adds onoff rcutorture module parameters to kernels having it.
|
# Adds onoff rcutorture module parameters to kernels having it.
|
||||||
rcutorture_param_onoff () {
|
rcutorture_param_onoff () {
|
||||||
if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2"
|
if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2"
|
||||||
then
|
then
|
||||||
echo CPU-hotplug kernel, adding rcutorture onoff.
|
echo CPU-hotplug kernel, adding rcutorture onoff. 1>&2
|
||||||
echo $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30
|
echo rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30
|
||||||
else
|
|
||||||
echo $1
|
|
||||||
fi
|
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
|
||||||
|
}
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
rcutorture_param_n_barrier_cbs () {
|
rcutorture_param_n_barrier_cbs () {
|
||||||
if echo $1 | grep -q "rcutorture\.n_barrier_cbs"
|
if echo $1 | grep -q "rcutorture\.n_barrier_cbs"
|
||||||
then
|
then
|
||||||
echo $1
|
:
|
||||||
else
|
else
|
||||||
echo $1 rcutorture.n_barrier_cbs=4
|
echo rcutorture.n_barrier_cbs=4
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -38,9 +38,20 @@ rcutorture_param_n_barrier_cbs () {
|
|||||||
rcutorture_param_onoff () {
|
rcutorture_param_onoff () {
|
||||||
if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2"
|
if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2"
|
||||||
then
|
then
|
||||||
echo CPU-hotplug kernel, adding rcutorture onoff.
|
echo CPU-hotplug kernel, adding rcutorture onoff. 1>&2
|
||||||
echo $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30
|
echo rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30
|
||||||
else
|
|
||||||
echo $1
|
|
||||||
fi
|
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_param_n_barrier_cbs "$1"` \
|
||||||
|
rcutorture.stat_interval=15 \
|
||||||
|
rcutorture.shutdown_secs=$3 \
|
||||||
|
rcutorture.rcutorture_runnable=1 \
|
||||||
|
rcutorture.test_no_idle_hz=1 \
|
||||||
|
rcutorture.verbose=1
|
||||||
|
}
|
||||||
|
@ -26,9 +26,9 @@
|
|||||||
rcutorture_param_n_barrier_cbs () {
|
rcutorture_param_n_barrier_cbs () {
|
||||||
if echo $1 | grep -q "rcutorture\.n_barrier_cbs"
|
if echo $1 | grep -q "rcutorture\.n_barrier_cbs"
|
||||||
then
|
then
|
||||||
echo $1
|
:
|
||||||
else
|
else
|
||||||
echo $1 rcutorture.n_barrier_cbs=4
|
echo rcutorture.n_barrier_cbs=4
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,8 +39,19 @@ rcutorture_param_onoff () {
|
|||||||
if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2"
|
if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2"
|
||||||
then
|
then
|
||||||
echo CPU-hotplug kernel, adding rcutorture onoff. 1>&2
|
echo CPU-hotplug kernel, adding rcutorture onoff. 1>&2
|
||||||
echo $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30
|
echo rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30
|
||||||
else
|
|
||||||
echo $1
|
|
||||||
fi
|
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_param_n_barrier_cbs "$1"` \
|
||||||
|
rcutorture.stat_interval=15 \
|
||||||
|
rcutorture.shutdown_secs=$3 \
|
||||||
|
rcutorture.rcutorture_runnable=1 \
|
||||||
|
rcutorture.test_no_idle_hz=1 \
|
||||||
|
rcutorture.verbose=1
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user