Re: [PATCH] virtio-blk: Disable callback in virtblk_done()
From: Paolo Bonzini <pbonzini@redhat.com>
Date: 2012-09-27 10:01:36
From: Paolo Bonzini <pbonzini@redhat.com>
Date: 2012-09-27 10:01:36
Il 27/09/2012 02:10, Rusty Russell ha scritto:
quoted
quoted
quoted
quoted
+ 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? Paolo