All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Jason Wang <jasowang@redhat.com>
Cc: Network Development <netdev@vger.kernel.org>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net-next RFC 4/4] virtio-net: clean tx descriptors from rx napi
Date: Mon, 6 Mar 2017 13:04:47 -0500	[thread overview]
Message-ID: <CAF=yD-JHLjLY0x1i8Yz00GKyGbpNrye9zuLsCfqqO07F_WJeHw@mail.gmail.com> (raw)
In-Reply-To: <CAF=yD-Lf3EtRptsL=qFnPV5jBiBTP9CFvfF0Xaatv6-PTiVy4w@mail.gmail.com>

On Mon, Mar 6, 2017 at 12:43 PM, Willem de Bruijn
<willemdebruijn.kernel@gmail.com> wrote:
>>> +static void virtnet_poll_cleantx(struct receive_queue *rq)
>>> +{
>>> +       struct virtnet_info *vi = rq->vq->vdev->priv;
>>> +       unsigned int index = vq2rxq(rq->vq);
>>> +       struct send_queue *sq = &vi->sq[index];
>>> +       struct netdev_queue *txq = netdev_get_tx_queue(vi->dev, index);
>>> +
>>> +       __netif_tx_lock(txq, smp_processor_id());
>>> +       free_old_xmit_skbs(sq, sq->napi.weight);
>>> +       __netif_tx_unlock(txq);
>>
>>
>> Should we check tx napi weight here? Or this was treated as an independent
>> optimization?
>
> Good point. This was not intended to run in no-napi mode as is.
> With interrupts disabled most of the time in that mode, I don't
> expect it to be worthwhile using in that case. I'll add the check
> for sq->napi.weight != 0.

I'm wrong here. Rx interrupts are not disabled, of course. It is
probably worth benchmarking, then.

  reply	other threads:[~2017-03-06 18:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-03 14:39 [PATCH net-next RFC 0/4] virtio-net tx napi Willem de Bruijn
2017-03-03 14:39 ` [PATCH net-next RFC 1/4] virtio-net: napi helper functions Willem de Bruijn
2017-03-03 14:39 ` [PATCH net-next RFC 2/4] virtio-net: transmit napi Willem de Bruijn
2017-03-06  9:21   ` Jason Wang
2017-03-06 17:50     ` Willem de Bruijn
2017-03-06 18:55       ` David Miller
2017-03-06 19:33         ` Michael S. Tsirkin
2017-03-06 19:43           ` Willem de Bruijn
2017-03-03 14:39 ` [PATCH net-next RFC 3/4] vhost: interrupt coalescing support Willem de Bruijn
2017-03-06  9:28   ` Jason Wang
2017-03-06 17:31     ` Willem de Bruijn
2017-03-08  3:25       ` Jason Wang
2017-03-03 14:39 ` [PATCH net-next RFC 4/4] virtio-net: clean tx descriptors from rx napi Willem de Bruijn
2017-03-06  9:34   ` Jason Wang
2017-03-06 17:43     ` Willem de Bruijn
2017-03-06 18:04       ` Willem de Bruijn [this message]
2017-03-06 19:44 ` [PATCH net-next RFC 0/4] virtio-net tx napi 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='CAF=yD-JHLjLY0x1i8Yz00GKyGbpNrye9zuLsCfqqO07F_WJeHw@mail.gmail.com' \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=willemb@google.com \
    /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.