ci/bare-metal: Set CPU and GPU governors to max, disable GPU runtime PM
authorDaniel Stone <daniels@collabora.com>
Fri, 11 Jun 2021 16:09:17 +0000 (17:09 +0100)
committerTomeu Vizoso <tomeu.vizoso@collabora.com>
Tue, 15 Jun 2021 12:02:44 +0000 (14:02 +0200)
Give us a bit more predictable performance by making sure we always run
at full tilt.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Acked-by: Martin Peres <martin.peres@mupuf.org>
Acked-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11337>

.gitlab-ci/common/generate-env.sh
.gitlab-ci/common/init-stage2.sh
src/amd/ci/gitlab-ci.yml
src/gallium/drivers/iris/ci/gitlab-ci.yml
src/gallium/drivers/panfrost/ci/gitlab-ci.yml
src/gallium/drivers/radeonsi/ci/gitlab-ci.yml

index 0195513..e0c2477 100755 (executable)
@@ -41,6 +41,7 @@ for var in \
     FD_MESA_DEBUG \
     FLAKES_CHANNEL \
     GPU_VERSION \
+    HWCI_FREQ_MAX \
     HWCI_KERNEL_MODULES \
     HWCI_START_XORG \
     HWCI_TEST_SCRIPT \
index a1cea3f..f711c85 100755 (executable)
@@ -22,6 +22,19 @@ export XDG_CACHE_HOME=/tmp
 # Make sure Python can find all our imports
 export PYTHONPATH=$(python3 -c "import sys;print(\":\".join(sys.path))")
 
+if [ "$HWCI_FREQ_MAX" = "true" ]; then
+  # Disable GPU frequency scaling
+  DEVFREQ_GOVERNOR=`find /sys/devices -name governor | grep gpu || true`
+  test -z "$DEVFREQ_GOVERNOR" || echo performance > $DEVFREQ_GOVERNOR || true
+
+  # Disable CPU frequency scaling
+  echo performance | tee -a /sys/devices/system/cpu/cpufreq/policy*/scaling_governor || true
+
+  # Disable GPU runtime power management
+  GPU_AUTOSUSPEND=`find /sys/devices -name autosuspend_delay_ms | grep gpu | head -1`
+  test -z "$GPU_AUTOSUSPEND" || echo -1 > $GPU_AUTOSUSPEND || true
+fi
+
 # Start a little daemon to capture the first devcoredump we encounter.  (They
 # expire after 5 minutes, so we poll for them).
 ./capture-devcoredump.sh &
index 91e00ad..06eabc1 100644 (file)
@@ -70,6 +70,7 @@ radv_stoney_vkcts:amd64:
     BOOT_METHOD: depthcharge
     KERNEL_IMAGE_TYPE: ""
     HWCI_KERNEL_MODULES: amdgpu
+    HWCI_FREQ_MAX: "true"
     VK_DRIVER: radeon
   tags:
     - mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt
index 5256cf3..558ab70 100644 (file)
@@ -8,6 +8,7 @@
     BOOT_METHOD: depthcharge
     KERNEL_IMAGE_TYPE: ""
     FLAKES_CHANNEL: "#intel-ci"
+    HWCI_FREQ_MAX: "true"
 
 .iris-apl-test:
   extends:
index f330604..01f9101 100644 (file)
@@ -2,6 +2,7 @@
   variables:
     FLAKES_CHANNEL: "#panfrost-ci"
     PAN_MESA_DEBUG: sync
+    HWCI_FREQ_MAX: "true"
 
 panfrost-t720-gles2:arm64:
   extends:
index 4c51c7b..0d47b11 100644 (file)
@@ -11,6 +11,7 @@
     DRIVER_NAME: radeonsi
     DEQP_PARALLEL: 4
     DEQP_EXPECTED_RENDERER: STONEY
+    HWCI_FREQ_MAX: "true"
   tags:
     - mesa-ci-x86-64-lava-hp-11A-G6-EE-grunt