From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Reinoud Zandijk" <reinoud@netbsd.org>,
"Ryo ONODERA" <ryoon@netbsd.org>,
"Brad Smith" <brad@comstyle.com>
Subject: Re: [PATCH] tests/unit/test-iov: Fix timeout problem on NetBSD and OpenBSD
Date: Mon, 22 Jan 2024 15:43:59 +0000 [thread overview]
Message-ID: <Za6NP8q2QnTXOsDK@redhat.com> (raw)
In-Reply-To: <20240122153347.71654-1-thuth@redhat.com>
On Mon, Jan 22, 2024 at 04:33:47PM +0100, Thomas Huth wrote:
> The test-iov code uses usleep() with small values (<= 30) in some
> nested loops with many iterations. This causes a small delay on OSes
> like Linux that have a precise sleeping mechanism, but on systems
> like NetBSD and OpenBSD, each usleep() call takes multiple microseconds,
> which then sum up in a total test time of multiple minutes!
>
> Looking at the code, the usleep() does not really seem to be necessary
> here - if not enough data could be send, we should simply always use
> select() to wait 'til we can send more. Thus remove the usleep() and
> re-arrange the code a little bit to make it more clear what is going
> on here.
>
> Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> tests/unit/test-iov.c | 20 +++++++++++---------
> 1 file changed, 11 insertions(+), 9 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
prev parent reply other threads:[~2024-01-22 15:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 15:33 [PATCH] tests/unit/test-iov: Fix timeout problem on NetBSD and OpenBSD Thomas Huth
2024-01-22 15:43 ` Daniel P. Berrangé [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Za6NP8q2QnTXOsDK@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=brad@comstyle.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=reinoud@netbsd.org \
--cc=ryoon@netbsd.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.