netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Duyck <alexander.h.duyck@redhat.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, nic_swsd@realtek.com,
	Dept-HSGLinuxNICDev@qlogic.com, sony.chacko@qlogic.com,
	intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com
Subject: Re: [PATCH 0/3] Stop using dev_kfree_skb_any in NAPI Tx clean-up
Date: Fri, 01 May 2015 09:45:55 -0700	[thread overview]
Message-ID: <5543ADC3.8010400@redhat.com> (raw)
In-Reply-To: <20150501.114223.1837223121502998313.davem@davemloft.net>

On 05/01/2015 08:42 AM, David Miller wrote:
> From: Alexander Duyck <alexander.h.duyck@redhat.com>
> Date: Thu, 30 Apr 2015 13:58:12 -0700
>
>> This change replaces the call to dev_kfree_skb_any in several NAPI based Tx
>> clean-up paths with dev_kfree_skb.  Where I made the replacement the
>> function appeared to always be in softirq context so we can avoid the
>> unnecessary time spent determining if we are in a hardirq context or not.
> It isn't always in softirq context.
>
> We can do a netconsole transmit from any context, and that code
> can and will invoke ->poll().

I knew ndo_start_xmit was affected by that, I didn't realize that the 
napi poll routine was as well.

> As Francois noted, netpoll_send_skb_on_dev() loops trying to transmit,
> and if the TX does nto give NETDEV_TX_OK it will try to execute TX
> reclaim by invoking ->poll().
>
> It's hard to trigger this, but if you do... the dev_kfree_skb_any()
> really is necessary.

Ugh, if anything it points out that there are probably a number of bugs 
in the various drivers out there since I think there were assumptions 
made on both sides about how all the NAPI and netpoll stuff works.  I'll 
probably be submitting fixes today for a number of drivers to address 
all the spots that have been missed and little things that need to be 
addressed.

- Alex

      reply	other threads:[~2015-05-01 16:45 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-30 20:58 [PATCH 0/3] Stop using dev_kfree_skb_any in NAPI Tx clean-up Alexander Duyck
2015-04-30 20:58 ` [PATCH 1/3] igb, ixgbe(vf), i40e(vf), fm10k: Use dev_kfree_skb in Tx cleanup path Alexander Duyck
2015-05-01  1:46   ` Jeff Kirsher
2015-04-30 20:58 ` [PATCH 2/3] r8169: " Alexander Duyck
2015-05-01  9:34   ` Francois Romieu
2015-05-01 12:06     ` Lino Sanfilippo
2015-05-01 12:15       ` Lino Sanfilippo
2015-05-01 15:36         ` David Miller
2015-04-30 20:58 ` [PATCH 3/3] bnx2: " Alexander Duyck
2015-05-01 15:42 ` [PATCH 0/3] Stop using dev_kfree_skb_any in NAPI Tx clean-up David Miller
2015-05-01 16:45   ` Alexander Duyck [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=5543ADC3.8010400@redhat.com \
    --to=alexander.h.duyck@redhat.com \
    --cc=Dept-HSGLinuxNICDev@qlogic.com \
    --cc=davem@davemloft.net \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jeffrey.t.kirsher@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nic_swsd@realtek.com \
    --cc=sony.chacko@qlogic.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).