diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-09-29 14:13:46 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2013-12-03 13:11:11 -0500 |
commit | 4275be83b807c2926d2b23e67eb61692a1810080 (patch) | |
tree | 8a38da9120e8e9d2ed4e797067e9afb8c91d19e8 /tools | |
parent | bb918535a15a0c9ca217a99394dcae0c44711f1c (diff) |
rcutorture: Add per-version default Kconfig fragments and module parameters
Different Kconfig parameters apply to different kernel versions, as
do different rcutorture module parameters. This commit allows the
rcutorture test scripts to adjust for different kernel versions.
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Greg KH <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
13 files changed, 242 insertions, 32 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/functions.sh b/tools/testing/selftests/rcutorture/bin/functions.sh index db1c32acdcf6..d4c15f81cd27 100644 --- a/tools/testing/selftests/rcutorture/bin/functions.sh +++ b/tools/testing/selftests/rcutorture/bin/functions.sh | |||
@@ -32,11 +32,10 @@ bootparam_hotplug_cpu () { | |||
32 | # | 32 | # |
33 | # Returns 1 if the config fragment specifies hotplug CPU. | 33 | # Returns 1 if the config fragment specifies hotplug CPU. |
34 | configfrag_hotplug_cpu () { | 34 | configfrag_hotplug_cpu () { |
35 | cf=$1 | 35 | if test ! -r "$1" |
36 | if test ! -r $cf | ||
37 | then | 36 | then |
38 | echo Unreadable config fragment $cf 1>&2 | 37 | echo Unreadable config fragment "$1" 1>&2 |
39 | exit -1 | 38 | exit -1 |
40 | fi | 39 | fi |
41 | grep -q '^CONFIG_HOTPLUG_CPU=y$' $cf | 40 | grep -q '^CONFIG_HOTPLUG_CPU=y$' "$1" |
42 | } | 41 | } |
diff --git a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh index 3b53078c5ff2..0a3f037a8bb3 100755 --- a/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm-test-1-rcu.sh | |||
@@ -44,6 +44,7 @@ T=/tmp/kvm-test-1-rcu.sh.$$ | |||
44 | trap 'rm -rf $T' 0 | 44 | trap 'rm -rf $T' 0 |
45 | 45 | ||
46 | . $KVM/bin/functions.sh | 46 | . $KVM/bin/functions.sh |
47 | . $KVPATH/ver_functions.sh | ||
47 | 48 | ||
48 | config_template=${1} | 49 | config_template=${1} |
49 | title=`echo $config_template | sed -e 's/^.*\///'` | 50 | title=`echo $config_template | sed -e 's/^.*\///'` |
@@ -133,14 +134,9 @@ else | |||
133 | fi | 134 | fi |
134 | 135 | ||
135 | # Generate CPU-hotplug boot parameters | 136 | # Generate CPU-hotplug boot parameters |
136 | if ! bootparam_hotplug_cpu "$bootargs" | 137 | boot_args="`rcutorture_param_onoff "$boot_args" $builddir/.config`" |
137 | then | 138 | # Generate rcu_barrier() boot parameter |
138 | if configfrag_hotplug_cpu $builddir/.config | 139 | boot_args="`rcutorture_param_n_barrier_cbs "$boot_args"`" |
139 | then | ||
140 | echo Kernel configured for CPU hotplug, adding rcutorture. | ||
141 | bootargs="$bootargs rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30" | ||
142 | fi | ||
143 | fi | ||
144 | 140 | ||
145 | echo $QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args\" > $resdir/qemu-cmd | 141 | echo $QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append \"noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args\" > $resdir/qemu-cmd |
146 | $QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args" & | 142 | $QEMU -name rcu-test -serial file:$builddir/console.log $qemu_args -m 512 -kernel $builddir/arch/x86/boot/bzImage -append "noapic selinux=0 console=ttyS0 initcall_debug debug rcutorture.stat_interval=15 rcutorture.shutdown_secs=$seconds rcutorture.rcutorture_runnable=1 $boot_args" & |
diff --git a/tools/testing/selftests/rcutorture/bin/kvm.sh b/tools/testing/selftests/rcutorture/bin/kvm.sh index 7deb7b44d647..92f726b01044 100644 --- a/tools/testing/selftests/rcutorture/bin/kvm.sh +++ b/tools/testing/selftests/rcutorture/bin/kvm.sh | |||
@@ -33,23 +33,7 @@ dur=30 | |||
33 | KVM=`pwd`/tools/testing/selftests/rcutorture; export KVM | 33 | KVM=`pwd`/tools/testing/selftests/rcutorture; export KVM |
34 | builddir=${KVM}/b1 | 34 | builddir=${KVM}/b1 |
35 | resdir="" | 35 | resdir="" |
36 | configs=" sysidleY.2013.06.19a \ | 36 | configs="" |
37 | sysidleN.2013.06.19a \ | ||
38 | P1-S-T-NH-SD-SMP-HP \ | ||
39 | P2-2-t-nh-sd-SMP-hp \ | ||
40 | P3-3-T-nh-SD-SMP-hp \ | ||
41 | P4-A-t-NH-sd-SMP-HP \ | ||
42 | P5-U-T-NH-sd-SMP-hp \ | ||
43 | P6---t-nh-SD-smp-hp \ | ||
44 | N1-S-T-NH-SD-SMP-HP \ | ||
45 | N2-2-t-nh-sd-SMP-hp \ | ||
46 | N3-3-T-nh-SD-SMP-hp \ | ||
47 | N4-A-t-NH-sd-SMP-HP \ | ||
48 | N5-U-T-NH-sd-SMP-hp \ | ||
49 | PT1-nh \ | ||
50 | PT2-NH \ | ||
51 | NT1-nh \ | ||
52 | NT3-NH" | ||
53 | ds=`date +%Y.%m.%d-%H:%M:%S` | 37 | ds=`date +%Y.%m.%d-%H:%M:%S` |
54 | kversion="" | 38 | kversion="" |
55 | 39 | ||
@@ -156,6 +140,12 @@ echo "resdir=$resdir" | |||
156 | 140 | ||
157 | PATH=${KVM}/bin:$PATH; export PATH | 141 | PATH=${KVM}/bin:$PATH; export PATH |
158 | CONFIGFRAG=${KVM}/configs; export CONFIGFRAG | 142 | CONFIGFRAG=${KVM}/configs; export CONFIGFRAG |
143 | KVPATH=${CONFIGFRAG}/$kversion; export KVPATH | ||
144 | |||
145 | if test -z "$configs" | ||
146 | then | ||
147 | configs="`cat $CONFIGFRAG/$kversion/CFLIST`" | ||
148 | fi | ||
159 | 149 | ||
160 | if test -z "$resdir" | 150 | if test -z "$resdir" |
161 | then | 151 | then |
@@ -181,6 +171,6 @@ do | |||
181 | rd=$resdir/$ds/$CF | 171 | rd=$resdir/$ds/$CF |
182 | mkdir $rd || : | 172 | mkdir $rd || : |
183 | echo Results directory: $rd | 173 | echo Results directory: $rd |
184 | kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic" "rcutorture.test_no_idle_hz=1 rcutorture.n_barrier_cbs=4 rcutorture.verbose=1" | 174 | kvm-test-1-rcu.sh $CONFIGFRAG/$kversion/$CF $builddir $rd $dur "-nographic" "rcutorture.test_no_idle_hz=1 rcutorture.verbose=1" |
185 | done | 175 | done |
186 | # Tracing: trace_event=rcu:rcu_nocb_grace_period,rcu:rcu_grace_period,rcu:rcu_grace_period_init,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_torture_read,rcu:rcu_invoke_callback,rcu:rcu_fqs,rcu:rcu_dyntick,rcu:rcu_unlock_preempted_task | 176 | # Tracing: trace_event=rcu:rcu_nocb_grace_period,rcu:rcu_grace_period,rcu:rcu_grace_period_init,rcu:rcu_quiescent_state_report,rcu:rcu_fqs,rcu:rcu_callback,rcu:rcu_torture_read,rcu:rcu_invoke_callback,rcu:rcu_fqs,rcu:rcu_dyntick,rcu:rcu_unlock_preempted_task |
diff --git a/tools/testing/selftests/rcutorture/configs/CFLIST b/tools/testing/selftests/rcutorture/configs/CFLIST new file mode 100644 index 000000000000..da4cbc668f2a --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/CFLIST | |||
@@ -0,0 +1,17 @@ | |||
1 | sysidleY.2013.06.19a | ||
2 | sysidleN.2013.06.19a | ||
3 | P1-S-T-NH-SD-SMP-HP | ||
4 | P2-2-t-nh-sd-SMP-hp | ||
5 | P3-3-T-nh-SD-SMP-hp | ||
6 | P4-A-t-NH-sd-SMP-HP | ||
7 | P5-U-T-NH-sd-SMP-hp | ||
8 | P6---t-nh-SD-smp-hp | ||
9 | N1-S-T-NH-SD-SMP-HP | ||
10 | N2-2-t-nh-sd-SMP-hp | ||
11 | N3-3-T-nh-SD-SMP-hp | ||
12 | N4-A-t-NH-sd-SMP-HP | ||
13 | N5-U-T-NH-sd-SMP-hp | ||
14 | PT1-nh | ||
15 | PT2-NH | ||
16 | NT1-nh | ||
17 | NT3-NH | ||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/CFLIST b/tools/testing/selftests/rcutorture/configs/v0.0/CFLIST new file mode 100644 index 000000000000..18223947bbcb --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/CFLIST | |||
@@ -0,0 +1,14 @@ | |||
1 | P1-S-T-NH-SD-SMP-HP | ||
2 | P2-2-t-nh-sd-SMP-hp | ||
3 | P3-3-T-nh-SD-SMP-hp | ||
4 | P4-A-t-NH-sd-SMP-HP | ||
5 | P5-U-T-NH-sd-SMP-hp | ||
6 | N1-S-T-NH-SD-SMP-HP | ||
7 | N2-2-t-nh-sd-SMP-hp | ||
8 | N3-3-T-nh-SD-SMP-hp | ||
9 | N4-A-t-NH-sd-SMP-HP | ||
10 | N5-U-T-NH-sd-SMP-hp | ||
11 | PT1-nh | ||
12 | PT2-NH | ||
13 | NT1-nh | ||
14 | NT3-NH | ||
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP index d81e11d280aa..d3ef873eb6e7 100644 --- a/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP +++ b/tools/testing/selftests/rcutorture/configs/v0.0/N1-S-T-NH-SD-SMP-HP | |||
@@ -1,5 +1,4 @@ | |||
1 | CONFIG_RCU_TRACE=y | 1 | CONFIG_RCU_TRACE=y |
2 | CONFIG_RCU_FAST_NO_HZ=y | ||
3 | CONFIG_NO_HZ=y | 2 | CONFIG_NO_HZ=y |
4 | CONFIG_SMP=y | 3 | CONFIG_SMP=y |
5 | CONFIG_RCU_FANOUT=8 | 4 | CONFIG_RCU_FANOUT=8 |
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP b/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP index 9647c44cf4b7..f72402d7c13d 100644 --- a/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP +++ b/tools/testing/selftests/rcutorture/configs/v0.0/P1-S-T-NH-SD-SMP-HP | |||
@@ -1,7 +1,6 @@ | |||
1 | CONFIG_RCU_TRACE=y | 1 | CONFIG_RCU_TRACE=y |
2 | CONFIG_RCU_CPU_STALL_INFO=y | 2 | CONFIG_RCU_CPU_STALL_INFO=y |
3 | CONFIG_NO_HZ=y | 3 | CONFIG_NO_HZ=y |
4 | CONFIG_RCU_FAST_NO_HZ=y | ||
5 | CONFIG_SMP=y | 4 | CONFIG_SMP=y |
6 | CONFIG_RCU_FANOUT=8 | 5 | CONFIG_RCU_FANOUT=8 |
7 | CONFIG_NR_CPUS=8 | 6 | CONFIG_NR_CPUS=8 |
diff --git a/tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh new file mode 100644 index 000000000000..af7d59bf0988 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v0.0/ver_functions.sh | |||
@@ -0,0 +1,35 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Kernel-version-dependent shell functions for the rest of the scripts. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | # GNU General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | # | ||
19 | # Copyright (C) IBM Corporation, 2013 | ||
20 | # | ||
21 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
22 | |||
23 | # rcutorture_param_n_barrier_cbs bootparam-string | ||
24 | # | ||
25 | # Adds n_barrier_cbs rcutorture module parameter to kernels having it. | ||
26 | rcutorture_param_n_barrier_cbs () { | ||
27 | echo $1 | ||
28 | } | ||
29 | |||
30 | # rcutorture_param_onoff bootparam-string config-file | ||
31 | # | ||
32 | # Adds onoff rcutorture module parameters to kernels having it. | ||
33 | rcutorture_param_onoff () { | ||
34 | echo $1 | ||
35 | } | ||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/CFLIST b/tools/testing/selftests/rcutorture/configs/v3.3/CFLIST new file mode 100644 index 000000000000..18223947bbcb --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/CFLIST | |||
@@ -0,0 +1,14 @@ | |||
1 | P1-S-T-NH-SD-SMP-HP | ||
2 | P2-2-t-nh-sd-SMP-hp | ||
3 | P3-3-T-nh-SD-SMP-hp | ||
4 | P4-A-t-NH-sd-SMP-HP | ||
5 | P5-U-T-NH-sd-SMP-hp | ||
6 | N1-S-T-NH-SD-SMP-HP | ||
7 | N2-2-t-nh-sd-SMP-hp | ||
8 | N3-3-T-nh-SD-SMP-hp | ||
9 | N4-A-t-NH-sd-SMP-HP | ||
10 | N5-U-T-NH-sd-SMP-hp | ||
11 | PT1-nh | ||
12 | PT2-NH | ||
13 | NT1-nh | ||
14 | NT3-NH | ||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh new file mode 100644 index 000000000000..921fec931114 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.3/ver_functions.sh | |||
@@ -0,0 +1,41 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Kernel-version-dependent shell functions for the rest of the scripts. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | # GNU General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | # | ||
19 | # Copyright (C) IBM Corporation, 2013 | ||
20 | # | ||
21 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
22 | |||
23 | # rcutorture_param_n_barrier_cbs bootparam-string | ||
24 | # | ||
25 | # Adds n_barrier_cbs rcutorture module parameter to kernels having it. | ||
26 | rcutorture_param_n_barrier_cbs () { | ||
27 | echo $1 | ||
28 | } | ||
29 | |||
30 | # rcutorture_param_onoff bootparam-string config-file | ||
31 | # | ||
32 | # Adds onoff rcutorture module parameters to kernels having it. | ||
33 | rcutorture_param_onoff () { | ||
34 | if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2" | ||
35 | then | ||
36 | echo CPU-hotplug kernel, adding rcutorture onoff. | ||
37 | echo $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30 | ||
38 | else | ||
39 | echo $1 | ||
40 | fi | ||
41 | } | ||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/CFLIST b/tools/testing/selftests/rcutorture/configs/v3.5/CFLIST new file mode 100644 index 000000000000..18223947bbcb --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/CFLIST | |||
@@ -0,0 +1,14 @@ | |||
1 | P1-S-T-NH-SD-SMP-HP | ||
2 | P2-2-t-nh-sd-SMP-hp | ||
3 | P3-3-T-nh-SD-SMP-hp | ||
4 | P4-A-t-NH-sd-SMP-HP | ||
5 | P5-U-T-NH-sd-SMP-hp | ||
6 | N1-S-T-NH-SD-SMP-HP | ||
7 | N2-2-t-nh-sd-SMP-hp | ||
8 | N3-3-T-nh-SD-SMP-hp | ||
9 | N4-A-t-NH-sd-SMP-HP | ||
10 | N5-U-T-NH-sd-SMP-hp | ||
11 | PT1-nh | ||
12 | PT2-NH | ||
13 | NT1-nh | ||
14 | NT3-NH | ||
diff --git a/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh new file mode 100644 index 000000000000..401974455aee --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/v3.5/ver_functions.sh | |||
@@ -0,0 +1,46 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Kernel-version-dependent shell functions for the rest of the scripts. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | # GNU General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | # | ||
19 | # Copyright (C) IBM Corporation, 2013 | ||
20 | # | ||
21 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
22 | |||
23 | # rcutorture_param_n_barrier_cbs bootparam-string | ||
24 | # | ||
25 | # Adds n_barrier_cbs rcutorture module parameter to kernels having it. | ||
26 | rcutorture_param_n_barrier_cbs () { | ||
27 | if echo $1 | grep -q "rcutorture\.n_barrier_cbs" | ||
28 | then | ||
29 | echo $1 | ||
30 | else | ||
31 | echo $1 rcutorture.n_barrier_cbs=4 | ||
32 | fi | ||
33 | } | ||
34 | |||
35 | # rcutorture_param_onoff bootparam-string config-file | ||
36 | # | ||
37 | # Adds onoff rcutorture module parameters to kernels having it. | ||
38 | rcutorture_param_onoff () { | ||
39 | if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2" | ||
40 | then | ||
41 | echo CPU-hotplug kernel, adding rcutorture onoff. | ||
42 | echo $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30 | ||
43 | else | ||
44 | echo $1 | ||
45 | fi | ||
46 | } | ||
diff --git a/tools/testing/selftests/rcutorture/configs/ver_functions.sh b/tools/testing/selftests/rcutorture/configs/ver_functions.sh new file mode 100644 index 000000000000..f99f23bc3934 --- /dev/null +++ b/tools/testing/selftests/rcutorture/configs/ver_functions.sh | |||
@@ -0,0 +1,46 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Kernel-version-dependent shell functions for the rest of the scripts. | ||
4 | # | ||
5 | # This program is free software; you can redistribute it and/or modify | ||
6 | # it under the terms of the GNU General Public License as published by | ||
7 | # the Free Software Foundation; either version 2 of the License, or | ||
8 | # (at your option) any later version. | ||
9 | # | ||
10 | # This program is distributed in the hope that it will be useful, | ||
11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
13 | # GNU General Public License for more details. | ||
14 | # | ||
15 | # You should have received a copy of the GNU General Public License | ||
16 | # along with this program; if not, write to the Free Software | ||
17 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
18 | # | ||
19 | # Copyright (C) IBM Corporation, 2013 | ||
20 | # | ||
21 | # Authors: Paul E. McKenney <paulmck@linux.vnet.ibm.com> | ||
22 | |||
23 | # rcutorture_param_n_barrier_cbs bootparam-string | ||
24 | # | ||
25 | # Adds n_barrier_cbs rcutorture module parameter to kernels having it. | ||
26 | rcutorture_param_n_barrier_cbs () { | ||
27 | if echo $1 | grep -q "rcutorture\.n_barrier_cbs" | ||
28 | then | ||
29 | echo $1 | ||
30 | else | ||
31 | echo $1 rcutorture.n_barrier_cbs=4 | ||
32 | fi | ||
33 | } | ||
34 | |||
35 | # rcutorture_param_onoff bootparam-string config-file | ||
36 | # | ||
37 | # Adds onoff rcutorture module parameters to kernels having it. | ||
38 | rcutorture_param_onoff () { | ||
39 | if ! bootparam_hotplug_cpu "$1" && configfrag_hotplug_cpu "$2" | ||
40 | then | ||
41 | echo CPU-hotplug kernel, adding rcutorture onoff. 1>&2 | ||
42 | echo $1 rcutorture.onoff_interval=3 rcutorture.onoff_holdoff=30 | ||
43 | else | ||
44 | echo $1 | ||
45 | fi | ||
46 | } | ||