Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: "David S . Miller" <davem@davemloft.net>
Cc: netdev <netdev@vger.kernel.org>,
	Eric Dumazet <edumazet@google.com>,
	Michael Chan <michael.chan@broadcom.com>,
	Aviad Krawczyk <aviad.krawczyk@huawei.com>,
	Song Liu <songliubraving@fb.com>,
	Douglas Miller <dougmill@linux.vnet.ibm.com>,
	Yisen Zhuang <yisen.zhuang@huawei.com>,
	"Michael S . Tsirkin" <mst@redhat.com>,
	Jason Wang <jasowang@redhat.com>,
	Harish Patil <harish.patil@cavium.com>,
	Manish Chopra <manish.chopra@cavium.com>,
	Netanel Belgazal <netanel@amazon.com>,
	Solarflare linux maintainers <linux-net-drivers@solarflare.com>,
	Thomas Falcon <tlfalcon@linux.vnet.ibm.com>,
	Edward Cree <ecree@solarflare.com>,
	Bert Kenward <bkenward@solarflare.com>
Subject: [PATCH net 09/11] sfc: remove ndo_poll_controller
Date: Thu, 27 Sep 2018 09:31:59 -0700	[thread overview]
Message-ID: <20180927163201.56609-10-edumazet@google.com> (raw)
In-Reply-To: <20180927163201.56609-1-edumazet@google.com>

As diagnosed by Song Liu, ndo_poll_controller() can
be very dangerous on loaded hosts, since the cpu
calling ndo_poll_controller() might steal all NAPI
contexts (for all RX/TX queues of the NIC). This capture
can last for unlimited amount of time, since one
cpu is generally not able to drain all the queues under load.

sfc uses NAPI for TX completions, so we better let core
networking stack call the napi->poll() to avoid the capture.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Edward Cree <ecree@solarflare.com>
Cc: Bert Kenward <bkenward@solarflare.com>
Cc: Solarflare linux maintainers <linux-net-drivers@solarflare.com>
---
 drivers/net/ethernet/sfc/efx.c | 26 --------------------------
 1 file changed, 26 deletions(-)

diff --git a/drivers/net/ethernet/sfc/efx.c b/drivers/net/ethernet/sfc/efx.c
index 330233286e785254f5f29c87f9557a305974f606..3d0dd39c289e05b8a7a6778363461ef5698dc62b 100644
--- a/drivers/net/ethernet/sfc/efx.c
+++ b/drivers/net/ethernet/sfc/efx.c
@@ -2206,29 +2206,6 @@ static void efx_fini_napi(struct efx_nic *efx)
 		efx_fini_napi_channel(channel);
 }
 
-/**************************************************************************
- *
- * Kernel netpoll interface
- *
- *************************************************************************/
-
-#ifdef CONFIG_NET_POLL_CONTROLLER
-
-/* Although in the common case interrupts will be disabled, this is not
- * guaranteed. However, all our work happens inside the NAPI callback,
- * so no locking is required.
- */
-static void efx_netpoll(struct net_device *net_dev)
-{
-	struct efx_nic *efx = netdev_priv(net_dev);
-	struct efx_channel *channel;
-
-	efx_for_each_channel(channel, efx)
-		efx_schedule_channel(channel);
-}
-
-#endif
-
 /**************************************************************************
  *
  * Kernel net device interface
@@ -2509,9 +2486,6 @@ static const struct net_device_ops efx_netdev_ops = {
 #endif
 	.ndo_get_phys_port_id   = efx_get_phys_port_id,
 	.ndo_get_phys_port_name	= efx_get_phys_port_name,
-#ifdef CONFIG_NET_POLL_CONTROLLER
-	.ndo_poll_controller = efx_netpoll,
-#endif
 	.ndo_setup_tc		= efx_setup_tc,
 #ifdef CONFIG_RFS_ACCEL
 	.ndo_rx_flow_steer	= efx_filter_rfs,
-- 
2.19.0.605.g01d371f741-goog

  parent reply	other threads:[~2018-09-27 22:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-27 16:31 [PATCH net 00/11] netpoll: second round of fixes Eric Dumazet
2018-09-27 16:31 ` [PATCH net 01/11] netpoll: do not test NAPI_STATE_SCHED in poll_one_napi() Eric Dumazet
2018-09-27 18:25   ` Michael Chan
2018-09-27 18:33     ` Song Liu
2018-09-27 16:31 ` [PATCH net 02/11] hinic: remove ndo_poll_controller Eric Dumazet
2018-09-27 16:31 ` [PATCH net 03/11] ehea: " Eric Dumazet
2018-09-27 16:31 ` [PATCH net 04/11] net: hns: " Eric Dumazet
2018-09-27 16:31 ` [PATCH net 05/11] virtio_net: " Eric Dumazet
2018-09-27 16:31 ` [PATCH net 06/11] qlcnic: " Eric Dumazet
2018-09-27 16:31 ` [PATCH net 07/11] qlogic: netxen: " Eric Dumazet
2018-09-27 16:31 ` [PATCH net 08/11] net: ena: " Eric Dumazet
2018-09-27 16:31 ` Eric Dumazet [this message]
2018-09-28  7:30   ` [PATCH net 09/11] sfc: " Bert Kenward
2018-09-27 16:32 ` [PATCH net 10/11] sfc-falcon: " Eric Dumazet
2018-09-28  7:30   ` Bert Kenward
2018-09-27 16:32 ` [PATCH net 11/11] ibmvnic: " Eric Dumazet
2018-09-28 18:14 ` [PATCH net 00/11] netpoll: second round of fixes David Miller

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=20180927163201.56609-10-edumazet@google.com \
    --to=edumazet@google.com \
    --cc=aviad.krawczyk@huawei.com \
    --cc=bkenward@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=dougmill@linux.vnet.ibm.com \
    --cc=ecree@solarflare.com \
    --cc=harish.patil@cavium.com \
    --cc=jasowang@redhat.com \
    --cc=linux-net-drivers@solarflare.com \
    --cc=manish.chopra@cavium.com \
    --cc=michael.chan@broadcom.com \
    --cc=mst@redhat.com \
    --cc=netanel@amazon.com \
    --cc=netdev@vger.kernel.org \
    --cc=songliubraving@fb.com \
    --cc=tlfalcon@linux.vnet.ibm.com \
    --cc=yisen.zhuang@huawei.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