ci: Configure DUTs for max performance

Lock CPU and GPU frequency scaling on devices so to speed up test
execution and lower the variation of frame times from performance replay
jobs.

Also disable autosuspend of the GPU device.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-By: Rohan Garg <rohan.garg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7987>
This commit is contained in:
Tomeu Vizoso 2020-11-19 17:01:41 +01:00 committed by Marge Bot
parent 8fc913fde2
commit eef5409df4
2 changed files with 22 additions and 0 deletions

View File

@ -46,6 +46,23 @@ if [ -n "$BM_START_XORG" ]; then
export DISPLAY=:0
fi
# Disable GPU frequency scaling
DEVFREQ_GOVERNOR=`find /sys/devices -name governor | grep gpu || true`
echo performance > $DEVFREQ_GOVERNOR || true
# Disable CPU frequency scaling
echo performance | tee -a /sys/devices/system/cpu/cpufreq/policy*/scaling_governor || true
# The below would be generally useful, but a bug in drm/msm leaves the GPU
# device in a broken state if we try to do it before the first client (Xorg
# in this case) connects.
# TODO: Make it inconditional once https://gitlab.freedesktop.org/drm/msm/-/issues/5 is solved in Mesa CI's kernel
if [ -n "$BM_START_XORG" ]; then
# Disable GPU runtime PM
GPU_AUTOSUSPEND=`find /sys/devices -name autosuspend_delay_ms | grep gpu | head -1`
echo -1 > $GPU_AUTOSUSPEND || true
fi
if sh $BARE_METAL_TEST_SCRIPT; then
OK=1
else

View File

@ -82,9 +82,14 @@ actions:
- modprobe amdgpu || true
# Disable GPU frequency scaling
- DEVFREQ_GOVERNOR=`find /sys/devices -name governor | grep gpu || true`
- 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 PM
- GPU_AUTOSUSPEND=`find /sys/devices -name autosuspend_delay_ms | grep gpu | head -1`
- echo -1 > $GPU_AUTOSUSPEND || true