Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761417AbbBJBtn (ORCPT ); Mon, 9 Feb 2015 20:49:43 -0500 Received: from ozlabs.org ([103.22.144.67]:37797 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751979AbbBJBtk (ORCPT ); Mon, 9 Feb 2015 20:49:40 -0500 From: Rusty Russell To: Jason Wang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, mst@redhat.com Cc: pagupta@redhat.com Subject: Re: [PATCH RFC v5 net-next 2/6] virtio_ring: try to disable event index callbacks in virtqueue_disable_cb() In-Reply-To: <1423471165-34243-3-git-send-email-jasowang@redhat.com> References: <1423471165-34243-1-git-send-email-jasowang@redhat.com> <1423471165-34243-3-git-send-email-jasowang@redhat.com> User-Agent: Notmuch/0.17 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Tue, 10 Feb 2015 11:37:38 +1030 Message-ID: <8761bay3ol.fsf@rustcorp.com.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1484 Lines: 39 Jason Wang writes: > Currently, we do nothing to prevent the callbacks in > virtqueue_disable_cb() when event index is used. This may cause > spurious interrupts which may damage the performance. This patch tries > to publish avail event as the used even to prevent the callbacks. > > Signed-off-by: Jason Wang Acked-by: Rusty Russell > --- > drivers/virtio/virtio_ring.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c > index 545fed5..e9ffbfb 100644 > --- a/drivers/virtio/virtio_ring.c > +++ b/drivers/virtio/virtio_ring.c > @@ -539,6 +539,8 @@ void virtqueue_disable_cb(struct virtqueue *_vq) > struct vring_virtqueue *vq = to_vvq(_vq); > > vq->vring.avail->flags |= cpu_to_virtio16(_vq->vdev, VRING_AVAIL_F_NO_INTERRUPT); > + vring_used_event(&vq->vring) = cpu_to_virtio16(_vq->vdev, > + vq->vring.avail->idx); > } > EXPORT_SYMBOL_GPL(virtqueue_disable_cb); > > -- > 1.8.3.1 > > _______________________________________________ > Virtualization mailing list > Virtualization@lists.linux-foundation.org > https://lists.linuxfoundation.org/mailman/listinfo/virtualization -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/