From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH] virtio-blk: Disable callback in virtblk_done() Date: Thu, 27 Sep 2012 12:01:36 +0200 Message-ID: <50642400.5030906@redhat.com> References: <1348540577-7474-1-git-send-email-asias@redhat.com> <5061BAED.9020205@redhat.com> <87ehlo497o.fsf@rustcorp.com.au> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Asias He , virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, "Michael S. Tsirkin" , Stefan Hajnoczi To: Rusty Russell Return-path: Received: from mail-pb0-f46.google.com ([209.85.160.46]:64110 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751468Ab2I0KBq (ORCPT ); Thu, 27 Sep 2012 06:01:46 -0400 Received: by pbbrr4 with SMTP id rr4so3344597pbb.19 for ; Thu, 27 Sep 2012 03:01:46 -0700 (PDT) In-Reply-To: <87ehlo497o.fsf@rustcorp.com.au> Sender: kvm-owner@vger.kernel.org List-ID: 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? Paolo