From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: virtio: imply disable_cb on callbacks Date: Wed, 19 May 2010 14:07:34 +0930 Message-ID: <201005191407.34607.rusty@rustcorp.com.au> References: <20100518113316.GA26757@redhat.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: virtualization@lists.linux-foundation.org, kvm@vger.kernel.org To: "Michael S. Tsirkin" Return-path: Received: from ozlabs.org ([203.10.76.45]:43119 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750832Ab0ESEhl (ORCPT ); Wed, 19 May 2010 00:37:41 -0400 In-Reply-To: <20100518113316.GA26757@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Tue, 18 May 2010 09:03:17 pm Michael S. Tsirkin wrote: > Rusty, the patch "virtio: imply disable_cb on callbacks" is on your tree. > I'd like to figure out how it works: for example: > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -69,6 +69,8 @@ static void blk_done(struct virtqueue *v > /* In case queue is stopped waiting for more buffers. */ > blk_start_queue(vblk->disk->queue); > spin_unlock_irqrestore(&vblk->lock, flags); > + > + vq->vq_ops->enable_cb(vq); > } > > static bool do_req(struct request_queue *q, struct virtio_blk *vblk, > > > Since this does not check the return status from enable_cb, > it seems we could loose an interrupt if it arrives > between poll and callback enable? It's been quite a while since I wrote this patch, and never really liked it enough to polish it. We would need to enable this *before* reading the queue, AFAICT. I'll remove it from my series; it's in the wilderness area already :) Thanks! Rusty.