Skip to content

Commit 161e992

Browse files
brooniectmarinas
authored andcommitted
kselftest/arm64: Poll less often while waiting for fp-stress children
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 <[email protected]> Acked-by: Will Deacon <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent a3590d7 commit 161e992

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/testing/selftests/arm64/fp/fp-stress.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,7 @@ int main(int argc, char **argv)
452452
{
453453
int ret;
454454
int timeout = 10 * (1000 / SIGNAL_INTERVAL_MS);
455+
int poll_interval = 5000;
455456
int cpus, i, j, c;
456457
int sve_vl_count, sme_vl_count;
457458
bool all_children_started = false;
@@ -587,7 +588,7 @@ int main(int argc, char **argv)
587588
* especially useful in emulation where we will both
588589
* be slow and likely to have a large set of VLs.
589590
*/
590-
ret = epoll_wait(epoll_fd, evs, tests, SIGNAL_INTERVAL_MS);
591+
ret = epoll_wait(epoll_fd, evs, tests, poll_interval);
591592
if (ret < 0) {
592593
if (errno == EINTR)
593594
continue;
@@ -625,6 +626,7 @@ int main(int argc, char **argv)
625626
}
626627

627628
all_children_started = true;
629+
poll_interval = SIGNAL_INTERVAL_MS;
628630
}
629631

630632
if ((timeout % LOG_INTERVALS) == 0)

0 commit comments

Comments
 (0)