]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
kselftest/arm64: Poll less often while waiting for fp-stress children
authorMark Brown <broonie@kernel.org>
Wed, 30 Oct 2024 00:02:03 +0000 (00:02 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Thu, 7 Nov 2024 17:06:36 +0000 (17:06 +0000)
While fp-stress is waiting for children to start it doesn't send any
signals to them so there is no need for it to have as short an epoll()
timeout as it does when the children are all running. We do still want to
have some timeout so that we can log diagnostics about missing children but
this can be relatively large. On emulated platforms the overhead of running
the supervisor process is quite high, especially during the process of
execing the test binaries.

Implement a longer epoll() timeout during the setup phase, using a 5s
timeout while waiting for children and switching  to the signal raise
interval when all the children are started and we start sending signals.

Signed-off-by: Mark Brown <broonie@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20241030-arm64-fp-stress-interval-v2-2-bd3cef48c22c@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
tools/testing/selftests/arm64/fp/fp-stress.c

index b81bc0842f177ba5985a2771f5ff924f04ff4582..ad867ff9687af3ee8214d6de0f136fde3d51aa93 100644 (file)
@@ -452,6 +452,7 @@ int main(int argc, char **argv)
 {
        int ret;
        int timeout = 10 * (1000 / SIGNAL_INTERVAL_MS);
+       int poll_interval = 5000;
        int cpus, i, j, c;
        int sve_vl_count, sme_vl_count;
        bool all_children_started = false;
@@ -587,7 +588,7 @@ int main(int argc, char **argv)
                 * especially useful in emulation where we will both
                 * be slow and likely to have a large set of VLs.
                 */
-               ret = epoll_wait(epoll_fd, evs, tests, SIGNAL_INTERVAL_MS);
+               ret = epoll_wait(epoll_fd, evs, tests, poll_interval);
                if (ret < 0) {
                        if (errno == EINTR)
                                continue;
@@ -625,6 +626,7 @@ int main(int argc, char **argv)
                        }
 
                        all_children_started = true;
+                       poll_interval = SIGNAL_INTERVAL_MS;
                }
 
                if ((timeout % LOG_INTERVALS) == 0)