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

2022-04-29 Thread Stefan Hajnoczi
On Fri, Apr 29, 2022 at 01:17:05AM +0200, Paolo Bonzini wrote: > 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 virtq

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

2022-04-28 Thread Paolo Bonzini
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

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

2022-04-28 Thread Stefan Hajnoczi
On Wed, Apr 27, 2022 at 11:12:34PM +0300, Nir Soffer wrote: > I tested patches 1 and 2 on top of 34723f59371f3fd02ea59b94674314b875504426 > and it solved the issue. > > Tested-by: Nir Soffer Thank you! Stefan signature.asc Description: PGP signature

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

2022-04-27 Thread Nir Soffer
On Wed, Apr 27, 2022 at 5:35 PM Stefan Hajnoczi wrote: > > The virtio-scsi event virtqueue is not emptied by its handler function. > 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

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

2022-04-27 Thread Stefan Hajnoczi
The virtio-scsi event virtqueue is not emptied by its handler function. 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 bu