diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2014-06-30 14:26:14 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2014-07-02 11:18:00 +0530 |
commit | 6da181ea60f29375dd3e48514a9403e6dff13fe8 (patch) | |
tree | 111e3fdc931ceda1d3fa562d1468dd6401b823bf | |
parent | 46a4efec4df8ea68501b69a4653509b22ab67c5f (diff) |
is-cpu-isolated: Run --stress on the right CPU
Currently we were creating 'stress' on control plane CPU and then migrating it
to data plane one. Instead create it on data plane CPU only.
Change-Id: I63a38db978e211fada66eb4a646b51517519699f
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rwxr-xr-x | common/scripts/is-cpu-isolated.sh | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/common/scripts/is-cpu-isolated.sh b/common/scripts/is-cpu-isolated.sh index ac93ae4..51610b9 100755 --- a/common/scripts/is-cpu-isolated.sh +++ b/common/scripts/is-cpu-isolated.sh @@ -211,21 +211,19 @@ isolate_cpu() { # Quiesce CPU: i.e. migrate timers/hrtimers away echo 1 > /dev/cpuset/dplane/$CPUSET_PREFIX"quiesce" - stress -q --cpu $ISOL_CPU --timeout $STRESS_DURATION & - # Restart $ISOL_CPU to migrate all tasks to CPU0 # Commented-out: as we should get good numbers without this HACK #echo 0 > /sys/devices/system/cpu/cpu$ISOL_CPU/online #echo 1 > /sys/devices/system/cpu/cpu$ISOL_CPU/online - # Try to move all processes in top set to the cplane set. - for pid in `ps h -C stress -o pid`; do - echo $pid > /dev/cpuset/dplane/tasks 2>/dev/null - if [ $? != 0 ]; then - isdebug echo -n "dplane: Cannot move PID $pid: " - isdebug echo "$(cat /proc/$pid/status | grep ^Name | cut -f2)" - fi - done + # Move shell to isolated CPU + echo $$ > /dev/cpuset/dplane/tasks + + # Start single cpu bound stress thread + stress -q --cpu 1 --timeout $STRESS_DURATION & + + # Move shell back to control plane CPU + echo $$ > /dev/cpuset/cplane/tasks } # routine to get CPU isolation time |