From: Amos Kong <akong@redhat.com>
To: Amit Shah <amit.shah@redhat.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
kvm@vger.kernel.org,
Virtualization List <virtualization@lists.linux-foundation.org>
Subject: Re: When I boot two virtio-rng devices, guest will hang
Date: Wed, 6 Aug 2014 01:45:26 +0800 [thread overview]
Message-ID: <20140805174526.GA31480@z.redhat.com> (raw)
In-Reply-To: <20140805102854.GA7958@z.redhat.com>
On Tue, Aug 05, 2014 at 06:28:54PM +0800, Amos Kong wrote:
> 3.16 (guest hangs with two rng devices)
> 3.16 + quick fix (can startup with two rng devices) (hotplug issue 1 + hotplug issue 2 exist)
> lates torvalds/linux.git + amit 4 patches (can startup with two rng devices) (only hotplug issue 2 exists)
>
> However, the 4 patches also fixed the hang issue, the hotplug issue was fixed a little.
> The hotplug issue is effected by the backend, or maybe it's not a real issue, because
> the rng device can be hot-removed after dd process is killed.
>
>
> Hotplug issue 1:
> 1. boot up guest with two rng device (rng0 uses /dev/urandom, rng1 uses /dev/random)
> 2. read data by dd in guest
> 3 (option 1). hot-remove rng0, then hot-remove rng1 -> result: _only rng1_ can't be removed until dd process is killed
> 3 (option 2). hot-remove rng1, then hot-remove rng0 -> result: two devices can be removed successfully, dd process will exit automatically.
>
> If we use /dev/urandom for rng0 and rng1, _rng0 & rng1_ can be removed, dd process will exit automatically.
>
> Hotplug issue 2:
> If we use /dev/random for rng0 and rng1, _rng0 & rng1_ can't be removed until dd process is killed.
>
> Hotplug issue 3:
> If we use /dev/random for rng0 and rng1, _only rng1_ can't be removed until dd process is killed.
Hi Amit,
I finally found the root problem and posted a fix to upstream:
http://lists.linuxfoundation.org/pipermail/virtualization/2014-August/027049.html
It can help to fix the hotplug issues on 3.16 & latest kernel, so
stable kernel is CCed.
> (The difference between /dev/random and /dev/urandom is the speed.)
>
> Thanks, Amos
--
Amos.
prev parent reply other threads:[~2014-08-05 17:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140728073242.GD2683@z.redhat.com>
2014-07-28 7:55 ` When I boot two virtio-rng devices, guest will hang Amit Shah
2014-07-28 8:49 ` Amos Kong
[not found] ` <20140728084920.GF2683@z.redhat.com>
2014-07-28 9:12 ` Amit Shah
2014-07-28 12:11 ` Amos Kong
2014-08-05 10:28 ` Amos Kong
2014-08-05 17:45 ` Amos Kong [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=20140805174526.GA31480@z.redhat.com \
--to=akong@redhat.com \
--cc=amit.shah@redhat.com \
--cc=herbert@gondor.apana.org.au \
--cc=kvm@vger.kernel.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).