On Fri, Jul 4, 2014 at 11:48 PM, Paolo Bonzini <pbonz...@redhat.com> 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. This should ensure >>> > that >>> > multiple notifications are coalesced, but it may also introduce new >>> > aio_notify calls even with my patch (a BH scheduled from a BH currently >>> > does >>> > an aio_notify; this can be fixed). >> >> I think we can do better than above because one aio IO completes lots of >> requests, and we just need to notify guest for all these requests. > > > Exactly, there would be just one BH and thus just one notify.
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 handle, but I am a bit headache for the 1st case. Thanks, -- Ming Lei