On Thu, Sep 27, 2012 at 12:01 PM, Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: > Il 27/09/2012 02:10, Rusty Russell ha scritto: >>>> >> + do { >>>> >> + virtqueue_disable_cb(vq); >>>> >> + while ((vbr = virtqueue_get_buf(vblk->vq, &len)) != NULL) { >>>> >> + if (vbr->bio) { >>>> >> + virtblk_bio_done(vbr); >>>> >> + bio_done = true; >>>> >> + } else { >>>> >> + virtblk_request_done(vbr); >>>> >> + req_done = true; >>>> >> + } >>>> >> } >>>> >> - } >>>> >> + } while (!virtqueue_enable_cb(vq)); >>>> >> /* In case queue is stopped waiting for more buffers. */ >>>> >> if (req_done) >>>> >> blk_start_queue(vblk->disk->queue); >> Fascinating. Please just confirm that VIRTIO_RING_F_EVENT_IDX is >> enabled? > > Yeah, it's a nice and cheap trick. Stefan, I see that you had this in > virtio-scsi since even before I picked it up. Do you remember how you > came up with it? I've played with disable_cb/enable_cb previously in virtio-blk and virtio-scsi when aliguori had suggested reducing notifies. I definitely didn't invent it :). Stefan -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html