aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Fernandes (Google) <joel@joelfernandes.org>2019-03-26 15:24:11 -0400
committerPaul E. McKenney <paulmck@linux.ibm.com>2019-05-28 09:06:09 -0700
commitdd064c35991435efc4da2a6c551601f6e80f2611 (patch)
tree91285bbf2febd83791256c07be91924ef7cc40d8
parentrcutorture: Select from only online CPUs (diff)
downloadlinux-dev-dd064c35991435efc4da2a6c551601f6e80f2611.tar.xz
linux-dev-dd064c35991435efc4da2a6c551601f6e80f2611.zip
rcutorture: Add cpu0 to the set of CPUs to add jitter
jitter.sh currently does not add CPU0 to the list of CPUs for adding of jitter. Let us add it to this list even when it is not hot-pluggable. Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org> Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com>
-rwxr-xr-xtools/testing/selftests/rcutorture/bin/jitter.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/testing/selftests/rcutorture/bin/jitter.sh b/tools/testing/selftests/rcutorture/bin/jitter.sh
index 81c6e6ab5d83..dc49a3ba6111 100755
--- a/tools/testing/selftests/rcutorture/bin/jitter.sh
+++ b/tools/testing/selftests/rcutorture/bin/jitter.sh
@@ -36,8 +36,12 @@ do
# Set affinity to randomly selected online CPU
cpus=`grep 1 /sys/devices/system/cpu/*/online |
- sed -e 's,/[^/]*$,,' -e 's/^[^0-9]*//' |
- grep -v '^0*$'`
+ sed -e 's,/[^/]*$,,' -e 's/^[^0-9]*//'`
+
+ # Do not leave out poor old cpu0 which may not be hot-pluggable
+ if [ ! -f "/sys/devices/system/cpu/cpu0/online" ]; then
+ cpus="0 $cpus"
+ fi
cpumask=`awk -v cpus="$cpus" -v me=$me -v n=$n 'BEGIN {
srand(n + me + systime());