From: Christian Borntraeger Subject: Re: virtio_net and SMP guests Date: Thu, 10 Jan 2008 16:39:15 +0100 Message-ID: <200801101639.15995.borntraeger@de.ibm.com> References: <200712141312.05562.borntraeger@de.ibm.com> <200712181751.24692.rusty@rustcorp.com.au> <200801101337.40433.borntraeger@de.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: virtualization-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Return-path: In-Reply-To: <200801101337.40433.borntraeger-tA70FqPdS9bQT0dZR+AlfA@public.gmane.org> Content-Disposition: inline List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Am Donnerstag, 10. Januar 2008 schrieb Christian Borntraeger: > Am Dienstag, 18. Dezember 2007 schrieb Rusty Russell: > > To me this points to doing interrupt suppression a different way. If we > > have a ->disable_cb() virtio function, and call it before we call > > netif_rx_schedule, does that fix it? > > The fix looks good and I agree with it. > > There is one problem that I try to find for some days, but the following > BUG_ON triggers: > > static void vring_disable_cb(struct virtqueue *_vq) > { > struct vring_virtqueue *vq = to_vvq(_vq); > > START_USE(vq); > ----> BUG_ON(vq->vring.avail->flags & VRING_AVAIL_F_NO_INTERRUPT); > vq->vring.avail->flags |= VRING_AVAIL_F_NO_INTERRUPT; > END_USE(vq); > } Ok, I found it: static int virtnet_open(struct net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); try_fill_recv(vi); /* If we didn't even get one input buffer, we're useless. */ if (vi->num == 0) return -ENOMEM; ---> int for new packet static void skb_recv_done(struct virtqueue *rvq) { struct virtnet_info *vi = rvq->vdev->priv; /* Suppress further interrupts. */ rvq->vq_ops->disable_cb(rvq); netif_rx_schedule(vi->dev, &vi->napi); } - poll is not yet possible, no softirq - return from interrupt napi_enable(&vi->napi); vi->rvq->vq_ops->disable_cb(vi->rvq); ---> BUG: its already disabled Christian ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace