[Bug 254513] virtio_random: random_harvestq spinning on a CPU with Q35 virtio random device

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 13 Sep 2021 06:21:15 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=254513

Kyle Evans <kevans@freebsd.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bryanv@FreeBSD.org,
                   |                            |cem@freebsd.org,
                   |                            |jmg@FreeBSD.org,
                   |                            |jrtc27@freebsd.org,
                   |                            |kevans@freebsd.org,
                   |                            |markm@FreeBSD.org

--- Comment #17 from Kyle Evans <kevans@freebsd.org> ---
(In reply to Chris Collins from comment #16)

Can you provide details on the host here? I'm a little curious if qemu is
configure to use a non-default backend for entropy, and what kernel version
it's running.

According to https://wiki.qemu.org/Features/VirtIORNG, the default is
/dev/random which may block until more recent linux releases. I'm wondering if
we're depleting the host's /dev/random with our (10hz?) polling, frequently
leaving us stuck in a tight spin here:
https://cgit.freebsd.org/src/tree/sys/dev/virtio/virtqueue.c?h=releng/13.0#n605
-- CC'ing some csprng@ folks and some virtio folks.

I wonder if it would make sense to add an optional timeout parameter to
virtqueue_poll() so that rng doesn't get stuck if vtrnd can't currently
contribute to the pool.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.