From 67478b3e2e67bb6d2a566a5d4fb5e253ed879213 Mon Sep 17 00:00:00 2001 From: Manoj Gupta Date: Tue, 28 May 2019 10:34:44 -0700 Subject: crosperf: Stop setting cpu governor. Performance governor makes data noisy for high-end machines while powersave makes speedometer2 timeout. Let's try with the defaults for now and decide a better strategy later. BUG=chromium:966514 TEST=unit tests pass. Change-Id: I12e0f1ce7a0eed52f07cd3e1272d4280b93ef3b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1632422 Tested-by: Manoj Gupta Legacy-Commit-Queue: Commit Bot Reviewed-by: George Burgess Commit-Queue: Manoj Gupta --- crosperf/suite_runner.py | 20 ++++++++++++-------- crosperf/suite_runner_unittest.py | 12 +----------- 2 files changed, 13 insertions(+), 19 deletions(-) (limited to 'crosperf') diff --git a/crosperf/suite_runner.py b/crosperf/suite_runner.py index 46610f01..b195d2cc 100644 --- a/crosperf/suite_runner.py +++ b/crosperf/suite_runner.py @@ -108,21 +108,22 @@ class SuiteRunner(object): """ # pyformat: disable set_cpu_freq = ( - 'set -e && ' # Disable Turbo in Intel pstate driver 'if [[ -e /sys/devices/system/cpu/intel_pstate/no_turbo ]]; then ' ' if grep -q 0 /sys/devices/system/cpu/intel_pstate/no_turbo; then ' ' echo -n 1 > /sys/devices/system/cpu/intel_pstate/no_turbo; ' ' fi; ' 'fi; ' - # Set governor to powersave for each cpu. - 'for f in /sys/devices/system/cpu/cpu*/cpufreq; do ' + # Uncomment the following lines to set governor to powersave for each + # cpu. Also uncomment the 'done' at end. + # 'for f in /sys/devices/system/cpu/cpu*/cpufreq; do ' # Skip writing scaling_governor if cpu is not online. - '[[ -e ${f/cpufreq/online} ]] && grep -q 0 ${f/cpufreq/online} ' - '&& continue; ' + # '[[ -e ${f/cpufreq/online} ]] && grep -q 0 ${f/cpufreq/online} ' + # '&& continue; ' # The cpu is online, can update. - 'cd $f; ' - 'echo powersave > scaling_governor; ' + # 'cd $f; ' + # 'echo powersave > scaling_governor; ' + # # Uncomment rest of lines to enable setting frequency by crosperf. # It sets the cpu to the second highest supported frequency. #'val=0; ' @@ -138,7 +139,10 @@ class SuiteRunner(object): #'fi ;' #'echo $highest > scaling_max_freq; ' #'echo $highest > scaling_min_freq; ' - 'done') + # + # Uncomment to enable the loop for CPU governor settings. + # 'done' + ) # pyformat: enable if self.log_level == 'average': self.logger.LogOutput( diff --git a/crosperf/suite_runner_unittest.py b/crosperf/suite_runner_unittest.py index 59cc8976..783a2934 100755 --- a/crosperf/suite_runner_unittest.py +++ b/crosperf/suite_runner_unittest.py @@ -197,22 +197,12 @@ class SuiteRunnerTest(unittest.TestCase): cmd = mock_cros_runcmd.call_args_list[0][0] # pyformat: disable set_cpu_cmd = ( - 'set -e && ' # Disable Turbo in Intel pstate driver 'if [[ -e /sys/devices/system/cpu/intel_pstate/no_turbo ]]; then ' ' if grep -q 0 /sys/devices/system/cpu/intel_pstate/no_turbo; then ' ' echo -n 1 > /sys/devices/system/cpu/intel_pstate/no_turbo; ' ' fi; ' - 'fi; ' - # Set governor to ppowersave for each cpu. - 'for f in /sys/devices/system/cpu/cpu*/cpufreq; do ' - # Skip writing scaling_governor if cpu is not online. - '[[ -e ${f/cpufreq/online} ]] && grep -q 0 ${f/cpufreq/online} ' - '&& continue; ' - # This cpu is online, can update. - 'cd $f; ' - 'echo powersave > scaling_governor; ' - 'done') + 'fi; ') # pyformat: enable self.assertEqual(cmd, (set_cpu_cmd,)) -- cgit v1.2.3