Description of problem:
1. Even if max-bytes and period settings are not provided, the timer is armed.
2. When the quota available has reached the max-bytes amount, the timer is still armed.
This just means qemu keeps waking up to service the vrng->rate_limit_timer timer even when there's no work to do upon waking up. This causes extra load on the host, as well as more power consumption.
The fix would be to not arm the timer when no quota restriction is specified, and also to disable the timer when the entire quota is replenished by a few timer invocations.
To test this, we can use virtio-rng trace events.
The trace events are not yet upstream, but I have posted a patch to do that. The trace events can be backported as part of this bug.
Before this bug is fixed, the trace events will show the timer firing often in the function virtio_rng_process(), with a trace event like
virtio_rng_requested_size rng 0x7f984c218758: 0 bytes requested, 4294967295 bytes quota left
After the fix, such 0 bytes requested trace events should not occur.
Fixed in upstream version 2.4.