[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZyEDhuX3dDPxJ8a-@J2N7QTR9R3.cambridge.arm.com>
Date: Tue, 29 Oct 2024 15:47:18 +0000
From: Mark Rutland <mark.rutland@....com>
To: Mark Brown <broonie@...nel.org>
Cc: Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>, Shuah Khan <shuah@...nel.org>,
linux-arm-kernel@...ts.infradead.org,
linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] kselftest/arm64: Lower poll interval while waiting
for fp-stress children
Nit: the title says we lower the poll interval, while we actually raise
it. Maybe that'd be clearer as:
kselftest/arm64: Raise poll timeout while waiting for fp-stress children
... or:
kselftest/arm64: Poll less frequently while waiting for fp-stress children
That aside, this looks fine.
Mark.
On Tue, Oct 29, 2024 at 12:10:40AM +0000, Mark Brown wrote:
> 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@...nel.org>
> ---
> tools/testing/selftests/arm64/fp/fp-stress.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/arm64/fp/fp-stress.c b/tools/testing/selftests/arm64/fp/fp-stress.c
> index c986c68fbcacdd295f4db57277075209193cb943..963e2d891ced72fb8d6eff4fdb5c7df0724b14f1 100644
> --- a/tools/testing/selftests/arm64/fp/fp-stress.c
> +++ b/tools/testing/selftests/arm64/fp/fp-stress.c
> @@ -453,6 +453,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;
> @@ -588,7 +589,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;
> @@ -626,6 +627,7 @@ int main(int argc, char **argv)
> }
>
> all_children_started = true;
> + poll_interval = SIGNAL_INTERVAL_MS;
> }
>
> if ((timeout % LOG_INTERVALS) == 0)
>
> --
> 2.39.2
>
Powered by blists - more mailing lists