Re: [Qemu-devel] [PATCH 2/2] virtio-blk: dataplane: notify guest as a batch

2014-07-04 Thread Ming Lei
On Sat, Jul 5, 2014 at 12:09 AM, Paolo Bonzini wrote: > Il 04/07/2014 17:57, Ming Lei ha scritto: > >> But we have two cases to consider: >> >> - one submitted IO includes requests from multi vq(virtio-blk or >> virtio-scsi maybe), >> and each vq has to notify guest >> >> - one submitted IO includ

Re: [Qemu-devel] [PATCH 2/2] virtio-blk: dataplane: notify guest as a batch

2014-07-04 Thread Paolo Bonzini
Il 04/07/2014 17:57, Ming Lei ha scritto: But we have two cases to consider: - one submitted IO includes requests from multi vq(virtio-blk or virtio-scsi maybe), and each vq has to notify guest - one submitted IO includes requests from multi bs for scsi device The 2nd case should be easy to ha

Re: [Qemu-devel] [PATCH 2/2] virtio-blk: dataplane: notify guest as a batch

2014-07-04 Thread Ming Lei
On Fri, Jul 4, 2014 at 11:48 PM, Paolo Bonzini wrote: > Il 04/07/2014 16:52, Ming Lei ha scritto: > >>> > What you can do is change notify_guest to something like >>> > >>> > qemu_bh_schedule(req->dev->dataplane->notify_guest_bh); >>> > >>> > and do the actual notification in the bottom half.

Re: [Qemu-devel] [PATCH 2/2] virtio-blk: dataplane: notify guest as a batch

2014-07-04 Thread Paolo Bonzini
Il 04/07/2014 16:52, Ming Lei ha scritto: > What you can do is change notify_guest to something like > > qemu_bh_schedule(req->dev->dataplane->notify_guest_bh); > > and do the actual notification in the bottom half. This should ensure that > multiple notifications are coalesced, but it may a

Re: [Qemu-devel] [PATCH 2/2] virtio-blk: dataplane: notify guest as a batch

2014-07-04 Thread Ming Lei
On Fri, Jul 4, 2014 at 8:55 PM, Paolo Bonzini wrote: > Il 04/07/2014 14:27, Ming Lei ha scritto: > >> Now requests are submitted as a batch, so it is natural >> to notify guest as a batch too. >> >> This may supress interrupt notification to VM: >> >> - in my test, decreased by ~13K/sec >

Re: [Qemu-devel] [PATCH 2/2] virtio-blk: dataplane: notify guest as a batch

2014-07-04 Thread Paolo Bonzini
Il 04/07/2014 14:27, Ming Lei ha scritto: Now requests are submitted as a batch, so it is natural to notify guest as a batch too. This may supress interrupt notification to VM: - in my test, decreased by ~13K/sec I don't think this can work. Requests are not completed FIFO. What yo

[Qemu-devel] [PATCH 2/2] virtio-blk: dataplane: notify guest as a batch

2014-07-04 Thread Ming Lei
Now requests are submitted as a batch, so it is natural to notify guest as a batch too. This may supress interrupt notification to VM: - in my test, decreased by ~13K/sec Signed-off-by: Ming Lei --- hw/block/dataplane/virtio-blk.c | 13 - hw/block/virtio-blk.c