Merge branch 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull RCU updates from Ingo Molnar: "The main changes in this cycle were: - changes related to No-CBs CPUs and NO_HZ_FULL - RCU-tasks implementation - torture-test updates - miscellaneous fixes - locktorture updates - RCU documentation updates" * 'core-rcu-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (81 commits) workqueue: Use cond_resched_rcu_qs macro workqueue: Add quiescent state between work items locktorture: Cleanup header usage locktorture: Cannot hold read and write lock locktorture: Fix __acquire annotation for spinlock irq locktorture: Support rwlocks rcu: Eliminate deadlock between CPU hotplug and expedited grace periods locktorture: Document boot/module parameters rcutorture: Rename rcutorture_runnable parameter locktorture: Add test scenario for rwsem_lock locktorture: Add test scenario for mutex_lock locktorture: Make torture scripting account for new _runnable name locktorture: Introduce torture context locktorture: Support rwsems locktorture: Add infrastructure for torturing read locks torture: Address race in module cleanup locktorture: Make statistics generic locktorture: Teach about lock debugging locktorture: Support mutexes locktorture: Add documentation ...
This commit is contained in:
4
tools/testing/selftests/rcutorture/bin/config2frag.sh
Normal file → Executable file
4
tools/testing/selftests/rcutorture/bin/config2frag.sh
Normal file → Executable file
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Usage: sh config2frag.sh < .config > configfrag
|
||||
#!/bin/bash
|
||||
# Usage: config2frag.sh < .config > configfrag
|
||||
#
|
||||
# Converts the "# CONFIG_XXX is not set" to "CONFIG_XXX=n" so that the
|
||||
# resulting file becomes a legitimate Kconfig fragment.
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# Usage: sh configcheck.sh .config .config-template
|
||||
#!/bin/bash
|
||||
# Usage: configcheck.sh .config .config-template
|
||||
#
|
||||
# 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
|
||||
|
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# sh configinit.sh config-spec-file [ build output dir ]
|
||||
# Usage: configinit.sh config-spec-file [ build output dir ]
|
||||
#
|
||||
# Create a .config file from the spec file. Run from the kernel source tree.
|
||||
# Exits with 0 if all went well, with 1 if all went well but the config
|
||||
|
@@ -64,6 +64,26 @@ configfrag_boot_params () {
|
||||
fi
|
||||
}
|
||||
|
||||
# configfrag_boot_cpus bootparam-string config-fragment-file config-cpus
|
||||
#
|
||||
# Decreases number of CPUs based on any maxcpus= boot parameters specified.
|
||||
configfrag_boot_cpus () {
|
||||
local bootargs="`configfrag_boot_params "$1" "$2"`"
|
||||
local maxcpus
|
||||
if echo "${bootargs}" | grep -q 'maxcpus=[0-9]'
|
||||
then
|
||||
maxcpus="`echo "${bootargs}" | sed -e 's/^.*maxcpus=\([0-9]*\).*$/\1/'`"
|
||||
if test "$3" -gt "$maxcpus"
|
||||
then
|
||||
echo $maxcpus
|
||||
else
|
||||
echo $3
|
||||
fi
|
||||
else
|
||||
echo $3
|
||||
fi
|
||||
}
|
||||
|
||||
# configfrag_hotplug_cpu config-fragment-file
|
||||
#
|
||||
# Returns 1 if the config fragment specifies hotplug CPU.
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Build a kvm-ready Linux kernel from the tree in the current directory.
|
||||
#
|
||||
# Usage: sh kvm-build.sh config-template build-dir more-configs
|
||||
# Usage: kvm-build.sh config-template build-dir more-configs
|
||||
#
|
||||
# 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
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Analyze a given results directory for locktorture progress.
|
||||
#
|
||||
# Usage: sh kvm-recheck-lock.sh resdir
|
||||
# Usage: 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
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# Analyze a given results directory for rcutorture progress.
|
||||
#
|
||||
# Usage: sh kvm-recheck-rcu.sh resdir
|
||||
# Usage: 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
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# check the build and console output for errors. Given a directory
|
||||
# containing results directories, this recursively checks them all.
|
||||
#
|
||||
# Usage: sh kvm-recheck.sh resdir ...
|
||||
# Usage: kvm-recheck.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
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# 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-run.sh config builddir resdir minutes qemu-args boot_args
|
||||
# Usage: kvm-test-1-run.sh config builddir resdir minutes qemu-args boot_args
|
||||
#
|
||||
# qemu-args defaults to "-nographic", along with arguments specifying the
|
||||
# number of CPUs and other options generated from
|
||||
@@ -140,6 +140,7 @@ fi
|
||||
# Generate -smp qemu argument.
|
||||
qemu_args="-nographic $qemu_args"
|
||||
cpu_count=`configNR_CPUS.sh $config_template`
|
||||
cpu_count=`configfrag_boot_cpus "$boot_args" "$config_template" "$cpu_count"`
|
||||
vcpus=`identify_qemu_vcpus`
|
||||
if test $cpu_count -gt $vcpus
|
||||
then
|
||||
@@ -214,7 +215,7 @@ then
|
||||
fi
|
||||
if test $kruntime -ge $((seconds + grace))
|
||||
then
|
||||
echo "!!! Hang at $kruntime vs. $seconds seconds" >> $resdir/Warnings 2>&1
|
||||
echo "!!! PID $qemu_pid hung at $kruntime vs. $seconds seconds" >> $resdir/Warnings 2>&1
|
||||
kill -KILL $qemu_pid
|
||||
break
|
||||
fi
|
||||
|
6
tools/testing/selftests/rcutorture/bin/kvm.sh
Normal file → Executable file
6
tools/testing/selftests/rcutorture/bin/kvm.sh
Normal file → Executable file
@@ -7,7 +7,7 @@
|
||||
# Edit the definitions below to set the locations of the various directories,
|
||||
# as well as the test duration.
|
||||
#
|
||||
# Usage: sh kvm.sh [ options ]
|
||||
# Usage: kvm.sh [ options ]
|
||||
#
|
||||
# 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
|
||||
@@ -188,7 +188,9 @@ for CF in $configs
|
||||
do
|
||||
if test -f "$CONFIGFRAG/$kversion/$CF"
|
||||
then
|
||||
echo $CF `configNR_CPUS.sh $CONFIGFRAG/$kversion/$CF` >> $T/cfgcpu
|
||||
cpu_count=`configNR_CPUS.sh $CONFIGFRAG/$kversion/$CF`
|
||||
cpu_count=`configfrag_boot_cpus "$TORTURE_BOOTARGS" "$CONFIGFRAG/$kversion/$CF" "$cpu_count"`
|
||||
echo $CF $cpu_count >> $T/cfgcpu
|
||||
else
|
||||
echo "The --configs file $CF does not exist, terminating."
|
||||
exit 1
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Check the build output from an rcutorture run for goodness.
|
||||
# The "file" is a pathname on the local system, and "title" is
|
||||
@@ -6,8 +6,7 @@
|
||||
#
|
||||
# The file must contain kernel build output.
|
||||
#
|
||||
# Usage:
|
||||
# sh parse-build.sh file title
|
||||
# Usage: parse-build.sh file title
|
||||
#
|
||||
# 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
|
||||
|
@@ -1,11 +1,10 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Check the console output from an rcutorture run for oopses.
|
||||
# The "file" is a pathname on the local system, and "title" is
|
||||
# a text string for error-message purposes.
|
||||
#
|
||||
# Usage:
|
||||
# sh parse-console.sh file title
|
||||
# Usage: parse-console.sh file title
|
||||
#
|
||||
# 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
|
||||
@@ -33,6 +32,10 @@ title="$2"
|
||||
|
||||
. functions.sh
|
||||
|
||||
if grep -Pq '\x00' < $file
|
||||
then
|
||||
print_warning Console output contains nul bytes, old qemu still running?
|
||||
fi
|
||||
egrep 'Badness|WARNING:|Warn|BUG|===========|Call Trace:|Oops:' < $file | grep -v 'ODEBUG: ' | grep -v 'Warning: unable to open an initial console' > $T
|
||||
if test -s $T
|
||||
then
|
||||
|
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
#
|
||||
# Check the console output from a torture run for goodness.
|
||||
# The "file" is a pathname on the local system, and "title" is
|
||||
@@ -7,8 +7,7 @@
|
||||
# The file must contain torture output, but can be interspersed
|
||||
# with other dmesg text, as in console-log output.
|
||||
#
|
||||
# Usage:
|
||||
# sh parse-torture.sh file title
|
||||
# Usage: parse-torture.sh file title
|
||||
#
|
||||
# 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
|
||||
|
@@ -1 +1,4 @@
|
||||
LOCK01
|
||||
LOCK02
|
||||
LOCK03
|
||||
LOCK04
|
6
tools/testing/selftests/rcutorture/configs/lock/LOCK02
Normal file
6
tools/testing/selftests/rcutorture/configs/lock/LOCK02
Normal file
@@ -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=mutex_lock
|
6
tools/testing/selftests/rcutorture/configs/lock/LOCK03
Normal file
6
tools/testing/selftests/rcutorture/configs/lock/LOCK03
Normal file
@@ -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=rwsem_lock
|
6
tools/testing/selftests/rcutorture/configs/lock/LOCK04
Normal file
6
tools/testing/selftests/rcutorture/configs/lock/LOCK04
Normal file
@@ -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=rw_lock
|
@@ -38,6 +38,6 @@ per_version_boot_params () {
|
||||
echo $1 `locktorture_param_onoff "$1" "$2"` \
|
||||
locktorture.stat_interval=15 \
|
||||
locktorture.shutdown_secs=$3 \
|
||||
locktorture.locktorture_runnable=1 \
|
||||
locktorture.torture_runnable=1 \
|
||||
locktorture.verbose=1
|
||||
}
|
||||
|
@@ -11,3 +11,6 @@ SRCU-N
|
||||
SRCU-P
|
||||
TINY01
|
||||
TINY02
|
||||
TASKS01
|
||||
TASKS02
|
||||
TASKS03
|
||||
|
9
tools/testing/selftests/rcutorture/configs/rcu/TASKS01
Normal file
9
tools/testing/selftests/rcutorture/configs/rcu/TASKS01
Normal file
@@ -0,0 +1,9 @@
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_PREEMPT_NONE=n
|
||||
CONFIG_PREEMPT_VOLUNTARY=n
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_DEBUG_LOCK_ALLOC=y
|
||||
CONFIG_PROVE_RCU=y
|
||||
CONFIG_TASKS_RCU=y
|
@@ -0,0 +1 @@
|
||||
rcutorture.torture_type=tasks
|
5
tools/testing/selftests/rcutorture/configs/rcu/TASKS02
Normal file
5
tools/testing/selftests/rcutorture/configs/rcu/TASKS02
Normal file
@@ -0,0 +1,5 @@
|
||||
CONFIG_SMP=n
|
||||
CONFIG_PREEMPT_NONE=y
|
||||
CONFIG_PREEMPT_VOLUNTARY=n
|
||||
CONFIG_PREEMPT=n
|
||||
CONFIG_TASKS_RCU=y
|
@@ -0,0 +1 @@
|
||||
rcutorture.torture_type=tasks
|
13
tools/testing/selftests/rcutorture/configs/rcu/TASKS03
Normal file
13
tools/testing/selftests/rcutorture/configs/rcu/TASKS03
Normal file
@@ -0,0 +1,13 @@
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_HOTPLUG_CPU=n
|
||||
CONFIG_SUSPEND=n
|
||||
CONFIG_HIBERNATION=n
|
||||
CONFIG_PREEMPT_NONE=n
|
||||
CONFIG_PREEMPT_VOLUNTARY=n
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_TASKS_RCU=y
|
||||
CONFIG_HZ_PERIODIC=n
|
||||
CONFIG_NO_HZ_IDLE=n
|
||||
CONFIG_NO_HZ_FULL=y
|
||||
CONFIG_NO_HZ_FULL_ALL=y
|
@@ -0,0 +1 @@
|
||||
rcutorture.torture_type=tasks
|
@@ -1,5 +1,4 @@
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=8
|
||||
CONFIG_PREEMPT_NONE=n
|
||||
CONFIG_PREEMPT_VOLUNTARY=n
|
||||
CONFIG_PREEMPT=y
|
||||
@@ -10,8 +9,7 @@ CONFIG_NO_HZ_FULL=n
|
||||
CONFIG_RCU_FAST_NO_HZ=y
|
||||
CONFIG_RCU_TRACE=y
|
||||
CONFIG_HOTPLUG_CPU=y
|
||||
CONFIG_RCU_FANOUT=8
|
||||
CONFIG_RCU_FANOUT_EXACT=n
|
||||
CONFIG_MAXSMP=y
|
||||
CONFIG_RCU_NOCB_CPU=y
|
||||
CONFIG_RCU_NOCB_CPU_ZERO=y
|
||||
CONFIG_DEBUG_LOCK_ALLOC=n
|
||||
|
@@ -1 +1 @@
|
||||
rcutorture.torture_type=rcu_bh
|
||||
rcutorture.torture_type=rcu_bh maxcpus=8
|
||||
|
@@ -1,5 +1,6 @@
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=16
|
||||
CONFIG_CPUMASK_OFFSTACK=y
|
||||
CONFIG_PREEMPT_NONE=y
|
||||
CONFIG_PREEMPT_VOLUNTARY=n
|
||||
CONFIG_PREEMPT=n
|
||||
@@ -7,7 +8,7 @@ CONFIG_PREEMPT=n
|
||||
CONFIG_HZ_PERIODIC=n
|
||||
CONFIG_NO_HZ_IDLE=n
|
||||
CONFIG_NO_HZ_FULL=y
|
||||
CONFIG_NO_HZ_FULL_ALL=y
|
||||
CONFIG_NO_HZ_FULL_ALL=n
|
||||
CONFIG_NO_HZ_FULL_SYSIDLE=y
|
||||
CONFIG_RCU_FAST_NO_HZ=n
|
||||
CONFIG_RCU_TRACE=y
|
||||
|
@@ -0,0 +1 @@
|
||||
nohz_full=2-9
|
@@ -51,7 +51,7 @@ per_version_boot_params () {
|
||||
`rcutorture_param_n_barrier_cbs "$1"` \
|
||||
rcutorture.stat_interval=15 \
|
||||
rcutorture.shutdown_secs=$3 \
|
||||
rcutorture.rcutorture_runnable=1 \
|
||||
rcutorture.torture_runnable=1 \
|
||||
rcutorture.test_no_idle_hz=1 \
|
||||
rcutorture.verbose=1
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@ this case. There are probably much better ways of doing this.
|
||||
That said, here are the commands:
|
||||
|
||||
------------------------------------------------------------------------
|
||||
cd tools/testing/selftests/rcutorture
|
||||
zcat /initrd.img > /tmp/initrd.img.zcat
|
||||
mkdir initrd
|
||||
cd initrd
|
||||
|
Reference in New Issue
Block a user