All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>, linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org, virtualization@lists.linux-foundation.org
Subject: Re: [PATCH RFC] virtio_net: enable tx interrupt
Date: Wed, 15 Oct 2014 12:40:43 +0800	[thread overview]
Message-ID: <543DFACB.5030905@redhat.com> (raw)
In-Reply-To: <543DF92C.6060209@redhat.com>

On 10/15/2014 12:33 PM, Jason Wang wrote:
> On 10/15/2014 07:11 AM, Michael S. Tsirkin wrote:
>> > On Wed, Oct 15, 2014 at 12:53:59AM +0300, Michael S. Tsirkin wrote:
>>>> >> >  static void skb_xmit_done(struct virtqueue *vq)
>>>> >> >  {
>>>> >> >  	struct virtnet_info *vi = vq->vdev->priv;
>>>> >> > +	struct send_queue *sq = &vi->sq[vq2txq(vq)];
>>>> >> >  
>>>> >> > -	/* Suppress further interrupts. */
>>>> >> > -	virtqueue_disable_cb(vq);
>>>> >> > -
>> > One note here: current code seems racy because of doing
>> > virtqueue_disable_cb from skb_xmit_done that I'm dropping here: there's
>> > no guarantee we don't get an interrupt while tx ring is running, and if
>> > that happens we can end up with interrupts disabled forever.
>> >
> Looks harmless since:
>
> - if event index is enabled, virtqueue_disable_cb() does nothing in fact.
> - if event index is disabled, we don't depend on tx interrupt and when
> num_free is low we will try to enable the tx interrupt again.

Ok, I think I get you here. For 'current' you mean the rfc I post.

  reply	other threads:[~2014-10-15  4:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-14 21:53 [PATCH RFC] virtio_net: enable tx interrupt Michael S. Tsirkin
2014-10-14 21:53 ` Michael S. Tsirkin
2014-10-14 23:11 ` Michael S. Tsirkin
2014-10-14 23:11   ` Michael S. Tsirkin
2014-10-15  4:33   ` Jason Wang
2014-10-15  4:33     ` Jason Wang
2014-10-15  4:40     ` Jason Wang [this message]
2014-10-15 11:04 ` Jason Wang
2014-10-15 11:04   ` Jason Wang
2014-10-15 11:57   ` Michael S. Tsirkin
2014-10-15 11:57     ` Michael S. Tsirkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=543DFACB.5030905@redhat.com \
    --to=jasowang@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.