All of lore.kernel.org
 help / color / mirror / Atom feed
From: Koichiro Den <den@klaipeden.com>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	virtualization@lists.linux-foundation.org,
	Network Development <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] virtio-net: make napi_tx param easier to grasp
Date: Mon, 21 Aug 2017 20:49:10 +0900	[thread overview]
Message-ID: <1503316150.8694.1.camel@klaipeden.com> (raw)
In-Reply-To: <CAF=yD-JA_JPyUbDd=SR9Epvzw6-kbUcrfvwRWODwmeV+yHEMHw@mail.gmail.com>

On Sun, 2017-08-20 at 16:30 -0400, Willem de Bruijn wrote:
> On Sat, Aug 19, 2017 at 2:37 AM, Koichiro Den <den@klaipeden.com> wrote:
> > The module param napi_tx needs not to be writable for now since we do
> > not have any means of activating/deactivating it online,
> 
> A virtio_net device inherits its napi tx mode from the global napi_tx flag
> on device up. It is possible to change the parameter and bring a device
> down/up to change the device mode.
> 
> > @@ -1179,13 +1172,19 @@ static int virtnet_open(struct net_device *dev)
> >         struct virtnet_info *vi = netdev_priv(dev);
> >         int i;
> > 
> > +       /* Tx napi touches cachelines on the cpu handling tx interrupts.
> > Only
> > +        * enable the feature if this is likely affine with the transmit
> > path.
> > +        */
> > +       if (!vi->affinity_hint_set)
> > +               napi_tx = false;
> > +
> 
> This disables napi globally if a specific device lacks affinity.
Now I see this is not appropriate since it just represents whether or not TX
napi is available, not that whether or not it is being turned on or off on a
particular device. Thank you.

To be honest I hoped to make it possible to see which mode it is currently
running on with ease, but I guess it's not nice to accomplish it with net sysfs
nor ethtool or whatever because it seems not much generic matter.

Thanks.

      parent reply	other threads:[~2017-08-21 11:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-19  6:37 [PATCH net-next] virtio-net: make napi_tx param easier to grasp Koichiro Den
2017-08-20 20:30 ` Willem de Bruijn
2017-08-20 20:30 ` Willem de Bruijn
2017-08-21 11:49   ` Koichiro Den
2017-08-21 11:49   ` Koichiro Den [this message]

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=1503316150.8694.1.camel@klaipeden.com \
    --to=den@klaipeden.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=willemdebruijn.kernel@gmail.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.