On 4/27/22 16:35, Stefan Hajnoczi wrote:
This is typical for rx virtqueues where the device uses buffers when
some event occurs (e.g. a packet is received, an error condition
happens, etc).
Polling non-empty virtqueues wastes CPU cycles. We are not waiting for
new buffers to become available, we are waiting for an event to occur,
so it's a misuse of CPU resources to poll for buffers.
Shouldn't polling wait for _used_ buffers, rather than available ones?
I agree that it's generally useless to poll the event queue, but not
because it doesn't empty the virtqueue.
Paolo