On 23 April 2014 17:11, Sanjay Singh Rawat sanjay.rawat@linaro.org wrote:
Signed-off-by: Sanjay Singh Rawat sanjay.rawat@linaro.org
This will help in catching issue like https://lkml.org/lkml/2014/3/25/122
Tested on my x86 dev m/c
Output: running hotplug stress on cpu : cpu1 pass: cpu hotplug count = 200 duration = 16.98 seconds running hotplug stress on cpu : cpu2 pass: cpu hotplug count = 200 duration = 16.36 seconds running hotplug stress on cpu : cpu3 pass: cpu hotplug count = 200 duration = 15.05 seconds
- Issue: For a hotplug count of 500 the system just hangs. Need to manually restart. Is it safe to simply plugout the cpu? What will happend to the tasks
s/happend/happen
in the cpu runqueue.
Why don't you want all above to be present in git log ? This is all useful information and should go into logs.
On hotplug, all the tasks/works/timers/hrtimers are migrated to other online CPUs..
cpuhotplug/cpuhotplug_09.sh | 70 ++++++++++++++++++++++++++++++++++++++++++ cpuhotplug/cpuhotplug_09.txt | 1 + 2 files changed, 71 insertions(+) create mode 100755 cpuhotplug/cpuhotplug_09.sh create mode 100644 cpuhotplug/cpuhotplug_09.txt
diff --git a/cpuhotplug/cpuhotplug_09.sh b/cpuhotplug/cpuhotplug_09.sh new file mode 100755 index 0000000..be0c91c --- /dev/null +++ b/cpuhotplug/cpuhotplug_09.sh @@ -0,0 +1,70 @@ +#!/bin/bash +# +# PM-QA validation test suite for the power management on Linux +# +# Copyright (C) 2014, Linaro Limited. +# +# 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 the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# Contributors: +# Sanjay Singh Rawat sanjay.rawat@linaro.org +# - initial API and implementation +#
+# URL : https://wiki.linaro.org/WorkingGroups/PowerManagement/Resources/TestSuite/Pm...
+source ../include/functions.sh +STRESS_COUNT=200
+cpuhotplug_stress() {
- local cpu=$1
- local dirpath=$CPU_PATH/$1
- local state=
- local start=
- local end=
- shift 1
- if [ "$cpu" == "cpu0" ]; then
# skipping main cpu
return 0
- fi
- echo "running hotplug stress on cpu :" $cpu
- start=$(echo $(awk '{print $1}' /proc/uptime))
- for i in $(seq 1 $STRESS_COUNT);
- do
set_offline $cpu
state=$(get_online $cpu)
if [ $state -ne 0 ]; then
echo "fail: cpu offline failed at " $i
return 1
fi
set_online $cpu
state=$(get_online $cpu)
if [ $state -ne 1 ]; then
echo "fail: cpu online failed at " $i
return 1
fi
- done
- end=$(echo $(awk '{print $1}' /proc/uptime))
- echo "pass: cpu hotplug in/out count =" $i "duration =" $(echo "$end-$start" | bc) "seconds"
- return 0
+}
+for_each_cpu cpuhotplug_stress +test_status_show diff --git a/cpuhotplug/cpuhotplug_09.txt b/cpuhotplug/cpuhotplug_09.txt new file mode 100644 index 0000000..5b0f8ac --- /dev/null +++ b/cpuhotplug/cpuhotplug_09.txt @@ -0,0 +1 @@
+test to stress cpu hotplug feature
1.7.10.4
linaro-dev mailing list linaro-dev@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-dev