qemu-stable
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/6] virtio-scsi: don't waste CPU polling the event virtqueue


From: Paolo Bonzini
Subject: Re: [PATCH 2/6] virtio-scsi: don't waste CPU polling the event virtqueue
Date: Fri, 29 Apr 2022 01:17:05 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]