From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net 00/15] netpoll: avoid capture effects for NAPI drivers Date: Sun, 23 Sep 2018 12:29:15 -0700 (PDT) Message-ID: <20180923.122915.2174284095784692286.davem@davemloft.net> References: <20180921222752.101307-1-edumazet@google.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, michael.chan@broadcom.com, ariel.elior@cavium.com, eric.dumazet@gmail.com, tariqt@mellanox.com, saeedm@mellanox.com, jeffrey.t.kirsher@intel.com, jakub.kicinski@netronome.com, songliubraving@fb.com, j.vosburgh@gmail.com, vfalico@gmail.com, andy@greyhouse.net To: edumazet@google.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:34612 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726437AbeIXB1u (ORCPT ); Sun, 23 Sep 2018 21:27:50 -0400 In-Reply-To: <20180921222752.101307-1-edumazet@google.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Fri, 21 Sep 2018 15:27:37 -0700 > 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, showing one ksoftirqd eating all cycles > can last for unlimited amount of time, since one > cpu is generally not able to drain all the queues under load. > > It seems that all networking drivers that do use NAPI > for their TX completions, should not provide a ndo_poll_controller() : > > Most NAPI drivers have netpoll support already handled > in core networking stack, since netpoll_poll_dev() > uses poll_napi(dev) to iterate through registered > NAPI contexts for a device. I'm having trouble understanding the difference. If the drivers are processing all of the RX/TX queue draining by hand in their ndo_poll_controller() method, how is that different from the generic code walking all of the registererd NAPI instances one by one?