From a3d0f42889809c61cb20d3fe6552625c270ffea3 Mon Sep 17 00:00:00 2001 From: wawryk Date: Tue, 29 Jun 2021 11:36:51 +0200 Subject: [PATCH] test/vhost: Always enable performance cpu governor in Vhost performance tests Signed-off-by: wawryk Change-Id: Id0c1217b1c7138e7c618d816948ca34ba8a09be6 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8543 Community-CI: Broadcom CI Tested-by: SPDK CI Jenkins Reviewed-by: Karol Latecki Reviewed-by: Tomasz Zawadzki Reviewed-by: Shuhei Matsumoto --- test/vhost/perf_bench/vhost_perf.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/vhost/perf_bench/vhost_perf.sh b/test/vhost/perf_bench/vhost_perf.sh index 7c0ac3f7c..4b20c8c07 100755 --- a/test/vhost/perf_bench/vhost_perf.sh +++ b/test/vhost/perf_bench/vhost_perf.sh @@ -212,6 +212,15 @@ if [[ -z $disk_map ]]; then fail "No disk map provided for test. Exiting." fi +# ===== Enable "performance" cpu governor ===== +if hash cpupower; then + cpupower frequency-set -g performance +else + echo "WARNING: Missing CPUPOWER!!! Please install." +fi +current_governor=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor) +echo "INFO: Using $current_governor cpu governor for test." + # ===== Precondition NVMes if specified ===== if [[ $run_precondition == true ]]; then # Using the same precondition routine possible for lvols thanks