kselftest/arm64: Hold fp-stress children until they're all spawned
authorMark Brown <broonie@kernel.org>
Tue, 29 Nov 2022 21:59:23 +0000 (21:59 +0000)
committerWill Deacon <will@kernel.org>
Thu, 1 Dec 2022 17:46:45 +0000 (17:46 +0000)
commit98102a2cb7860b4d8226d6c2996f068fb4da5ed5
tree2d50e33238ddd6bfdb9a6dff0550e8aa94f0b64b
parent642978981ec8a79da00828c696c58b3732b993a6
kselftest/arm64: Hold fp-stress children until they're all spawned

At present fp-stress has a bit of a thundering herd problem since the
children it spawns start running immediately, meaning that they can start
starving the parent process of CPU before it has even started all the
children. This is much more severe on virtual platforms since they tend to
support far more SVE and SME vector lengths, be slower in general and for
some have issues with performance when simulating multiple CPUs.

We can mitigate this problem by having all the child processes block before
starting the test program, meaning that we at least have all the child
processes started before we start heavily using CPU. We still have the same
load issues while waiting for the actual stress test programs to start up
and produce output but they're at least all ready to go before that kicks
in, resulting in substantial reductions in overall runtime on some of the
severely affected systems. One test was showing about 20% improvement.

Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20221129215926.442895-2-broonie@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
tools/testing/selftests/arm64/fp/fp-stress.c