From 275727add05bd14867347d8b67ec3a629c3473d2 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Sat, 31 Aug 2024 14:58:11 +0100 Subject: [PATCH] ci/virgl: Special-case llvmpipe parallelisation When we're running VirGL/Venus, we sometimes want to invert our parallelism. As some commands can serialise at the host level, we don't always want to launch as many test clients as we have CPU cores. Instead, we want to use our parallelism for llvmpipe's rendering, and launch only a single test at a time. Signed-off-by: Daniel Stone Part-of: --- .gitlab-ci/crosvm-runner.sh | 10 ++++++++++ src/gallium/drivers/virgl/ci/gitlab-ci-inc.yml | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci/crosvm-runner.sh b/.gitlab-ci/crosvm-runner.sh index e345b3b99c9..38e8cd16480 100755 --- a/.gitlab-ci/crosvm-runner.sh +++ b/.gitlab-ci/crosvm-runner.sh @@ -2,6 +2,16 @@ # shellcheck disable=SC2086 # we want word splitting set -e +# Instead of starting one dEQP instance per available CPU core, pour our +# concurrency at llvmpipe threads instead. This is mostly useful for VirGL and +# Venus, which serialise quite a bit at the host level. So instead of smashing +# it with a pile of concurrent jobs which don't actually parallelise very well, +# we use that concurrency for llvmpipe/lavapipe's render pipeline. +if [ -n "${PARALLELISE_VIA_LP_THREADS:-}" ]; then + export LP_NUM_THREADS="${FDO_CI_CONCURRENT:-4}" + export FDO_CI_CONCURRENT=1 +fi + # If run outside of a deqp-runner invoction (e.g. piglit trace replay), then act # the same as the first thread in its threadpool. THREAD=${DEQP_RUNNER_THREAD:-0} diff --git a/src/gallium/drivers/virgl/ci/gitlab-ci-inc.yml b/src/gallium/drivers/virgl/ci/gitlab-ci-inc.yml index 85ba5b85b3f..f6e8acec012 100644 --- a/src/gallium/drivers/virgl/ci/gitlab-ci-inc.yml +++ b/src/gallium/drivers/virgl/ci/gitlab-ci-inc.yml @@ -71,7 +71,8 @@ variables: HWCI_KERNEL_MODULES: vhost_vsock HWCI_KVM: "true" - HWCI_TEST_SCRIPT: "LP_NUM_THREADS=${FDO_CI_CONCURRENT} FDO_CI_CONCURRENT=1 /install/crosvm-runner.sh /install/piglit/piglit-traces.sh" + HWCI_TEST_SCRIPT: "/install/crosvm-runner.sh /install/piglit/piglit-traces.sh" + PARALLELISE_VIA_LP_THREADS: 1 GPU_VERSION: virgl DRIVER_NAME: virgl GALLIUM_DRIVER: virgl