From: Martin Wilck <mwilck@suse.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, Jason Wang <jasowang@redhat.com>
Cc: qemu-devel@nongnu.org, virtualization@lists.linux-foundation.org
Subject: Reminder: [PATCH v2] virtio-rng: return available data with O_NONBLOCK
Date: Tue, 11 Aug 2020 12:23:15 +0200 [thread overview]
Message-ID: <b88ec62cb590ac326f73bdb92737d21cc508740a.camel@suse.com> (raw)
In-Reply-To: <20200715133255.10526-1-mwilck@suse.com>
On Wed, 2020-07-15 at 15:32 +0200, mwilck@suse.com wrote:
> From: Martin Wilck <mwilck@suse.com>
>
> If a program opens /dev/hwrng with O_NONBLOCK and uses poll() and
> non-blocking read() to retrieve random data, it ends up in a tight
> loop with poll() always returning POLLIN and read() returning EAGAIN.
> This repeats forever until some process makes a blocking read() call.
> The reason is that virtio_read() always returns 0 in non-blocking
> mode,
> even if data is available. Worse, it fetches random data from the
> hypervisor after every non-blocking call, without ever using this
> data.
Gentle review reminder.
https://patchew.org/QEMU/20200715133255.10526-1-mwilck@suse.com/
Regards
Martin
next prev parent reply other threads:[~2020-08-11 10:24 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-15 13:32 [PATCH v2] virtio-rng: return available data with O_NONBLOCK mwilck
2020-08-11 10:23 ` Martin Wilck [this message]
2020-08-11 10:37 ` Philippe Mathieu-Daudé
2020-08-11 12:02 ` Laurent Vivier
2020-08-11 12:22 ` Martin Wilck
2020-08-11 12:39 ` Laurent Vivier
2020-08-11 12:53 ` Martin Wilck
2020-08-11 13:00 ` Laurent Vivier
2020-08-11 13:14 ` Michael S. Tsirkin
2020-08-11 13:53 ` Laurent Vivier
2020-08-11 14:49 ` Michael S. Tsirkin
2020-08-11 15:00 ` Laurent Vivier
2020-08-11 14:12 ` Martin Wilck
2020-08-11 11:26 ` Michael S. Tsirkin
2020-08-11 12:07 ` Martin Wilck
2020-08-11 12:58 ` Michael S. Tsirkin
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=b88ec62cb590ac326f73bdb92737d21cc508740a.camel@suse.com \
--to=mwilck@suse.com \
--cc=jasowang@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=virtualization@lists.linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).