From: ebiederm@xmission.com (Eric W. Biederman)
To: "Tantilov\, Emil S" <emil.s.tantilov@intel.com>
Cc: David Miller <davem@davemloft.net>, "Kirsher\,
Jeffrey T" <jeffrey.t.kirsher@intel.com>,
"netdev\@vger.kernel.org" <netdev@vger.kernel.org>,
"gospo\@redhat.com" <gospo@redhat.com>,
"sassmann\@redhat.com" <sassmann@redhat.com>,
"asharma\@fb.com" <asharma@fb.com>,
"stable\@vger.kernel.org" <stable@vger.kernel.org>, "Keller\,
Jacob E" <jacob.e.keller@intel.com>
Subject: Re: [net-next 02/16] ixgbe: fix spinlock recursion with netpoll and busy poll
Date: Fri, 14 Mar 2014 19:08:09 -0700 [thread overview]
Message-ID: <87siqkqkmu.fsf@xmission.com> (raw)
In-Reply-To: <87618083B2453E4A8714035B62D679924FF2B0DD@FMSMSX105.amr.corp.intel.com> (Emil S. Tantilov's message of "Fri, 14 Mar 2014 20:40:25 +0000")
"Tantilov, Emil S" <emil.s.tantilov@intel.com> writes:
>>-----Original Message-----
>>From: David Miller [mailto:davem@davemloft.net]
>>Sent: Friday, March 14, 2014 11:59 AM
>>To: Kirsher, Jeffrey T
>>Cc: Tantilov, Emil S; netdev@vger.kernel.org;
>>gospo@redhat.com; sassmann@redhat.com; asharma@fb.com;
>>stable@vger.kernel.org; Keller, Jacob E
>>Subject: Re: [net-next 02/16] ixgbe: fix spinlock recursion
>>with netpoll and busy poll
>>
>>From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>Date: Fri, 14 Mar 2014 02:47:12 -0700
>>
>>> From: Emil Tantilov <emil.s.tantilov@intel.com>
>>>
>>> This patch resolves a hang with busy poll when used with netconsole.
>>>
>>> The main change is the check for netpoll packets in ixgbe_poll() which
>>> prevents a call to spin_lock_bh() while interrupts are disabled.
>>>
>>> In addition it removes the call to netif_rx() since netif_receive_skb()
>>> can deal with netpoll packets and also replaced the global adapter flag
>>> with per-q_vector bool that indicates Rx packet from netpoll which
>>> should help with performance.
>>>
>>> CC: Arun Sharma <asharma@fb.com>
>>> CC: stable <stable@vger.kernel.org>
>>> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
>>> Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
>>> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
>>> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
>>
>>Eric Biederman and co. are working to make this completely unnecessary.
>>
>>What is going to happen is that poll will be called with a budget of
>>zero, and no RX processing will thus occur, for netpoll.
>>
>>Nothing in the RX path can handle being invoked from hardware
>>interrupt context, so we have to prevent it completely in all
>>drivers that support netpoll.
>
> I noticed Eric's patches and this is obviously the better way to deal
> with it, but once the netpoll_rx patches are accepted will they make
> it into previous stable releases? Currently kernels between 3.11 and
> 3.13 (assuming Eric's changes make it into 3.14) will hang when
> netpoll and busy poll are used together.
A quick comment on this patch. IXGBE_FLAG_IN_NETPOLL in ixgbe (before
your refinement) is harmless but complete nonsense. The napi poll
methods do not get called from ndo_poll_controller. So the call of
netif_rx is bunk.
Before my patches go in netpoll will cause any packets processed with
napi_gro_receive or netif_receive_skb while netconsole is sending a
packet to be dropped, so netif_rx (which is not called) should be
unnecessary.
As for the netpoll hang taking the lock. I expect that the fix for
handling receving packets with netpoll is simply to disable interrupts
in the ixgbe_qv_lock_ family of functions, so you can handle netpoll
from hard irq context.
Of course that won't be needed as soon David merges my patches and but shrug.
Eric
next prev parent reply other threads:[~2014-03-15 2:08 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-14 9:47 [net-next 00/16][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2014-03-14 9:47 ` [net-next 01/16] ixgbe: add check for netif_carrier_ok in ixgbe_xmit_frame Jeff Kirsher
2014-03-14 18:57 ` David Miller
2014-03-14 20:19 ` Tantilov, Emil S
2014-03-14 21:51 ` David Miller
2014-03-15 0:19 ` Ben Hutchings
2014-03-15 0:24 ` Tantilov, Emil S
2014-03-14 9:47 ` [net-next 02/16] ixgbe: fix spinlock recursion with netpoll and busy poll Jeff Kirsher
2014-03-14 18:58 ` David Miller
2014-03-14 20:40 ` Tantilov, Emil S
2014-03-14 21:53 ` David Miller
2014-03-15 2:08 ` Eric W. Biederman [this message]
2014-03-14 9:47 ` [net-next 03/16] igb: Fix code comment Jeff Kirsher
2014-03-14 9:47 ` [net-next 04/16] i40e: delete netdev after deleting napi and vectors Jeff Kirsher
2014-03-14 9:47 ` [net-next 05/16] i40e: Fix a bug in the update logic for FDIR SB filter Jeff Kirsher
2014-03-14 9:47 ` [net-next 06/16] i40e/i40evf: Some flow director HW definition fixes Jeff Kirsher
2014-03-14 9:47 ` [net-next 07/16] i40e: make string references to q be queue Jeff Kirsher
2014-03-14 9:47 ` [net-next 08/16] i40e: cleanup strings Jeff Kirsher
2014-03-14 9:47 ` [net-next 09/16] i40e: simplified init string Jeff Kirsher
2014-03-14 9:47 ` [net-next 10/16] i40e: Fix function comments Jeff Kirsher
2014-03-14 9:47 ` [net-next 11/16] i40e: Define a new state variable to keep track of feature auto disable Jeff Kirsher
2014-03-14 9:47 ` [net-next 12/16] i40e: Add code to handle FD table full condition Jeff Kirsher
2014-03-14 9:47 ` [net-next 13/16] i40e: Bug fix for FDIR replay logic Jeff Kirsher
2014-03-14 9:47 ` [net-next 14/16] i40e: Let MDD events be handled by MDD handler Jeff Kirsher
2014-03-14 9:47 ` [net-next 15/16] i40e/i40evf: Use correct number of VF vectors Jeff Kirsher
2014-03-14 9:47 ` [net-next 16/16] i40e/i40evf: Use dma_set_mask_and_coherent Jeff Kirsher
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=87siqkqkmu.fsf@xmission.com \
--to=ebiederm@xmission.com \
--cc=asharma@fb.com \
--cc=davem@davemloft.net \
--cc=emil.s.tantilov@intel.com \
--cc=gospo@redhat.com \
--cc=jacob.e.keller@intel.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.com \
--cc=stable@vger.kernel.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.