From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 034202BD9 for ; Thu, 7 Apr 2016 16:33:47 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga101.jf.intel.com with ESMTP; 07 Apr 2016 07:33:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,449,1455004800"; d="scan'208";a="682438743" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.221.30]) ([10.237.221.30]) by FMSMGA003.fm.intel.com with ESMTP; 07 Apr 2016 07:33:42 -0700 To: Jay Rolette , DPDK References: Cc: Neil Horman From: Ferruh Yigit Message-ID: <57066FC5.6000900@intel.com> Date: Thu, 7 Apr 2016 15:33:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] Potential deadlock in KNI RX path X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2016 14:33:48 -0000 On 4/6/2016 9:22 PM, Jay Rolette wrote: > Over a year ago, Neil pointed out that calling netif_rx() from > kni_net_rx_normal() was a bug and could cause lockups. Here's the comment: > > http://dpdk.org/ml/archives/dev/2015-March/015783.html > > Looking at the current code base, it is still calling netif_rx() instead of > netif_rx_ni() as suggested. > > Did that fall through the cracks or is there disagreement about whether it > was the right thing to do? > > Thanks, > Jay > Hi Jay, Using netif_rx_ni() looks like correct thing to do. I will send a patch for it. But we poll on this function, this means doing lots of preempt_disable/enable(); which may have a negative effect on performance. Although I did very brief test and did not observed any performance degradation. It can be great if somebody out already using KNI do some performance analysis with the patch. Another observation, for multiple kthread mode, the ksoftirq threads CPU consumption removed when switched to netif_rx_ni(), I remember in mail list somebody complained about ksoftirq CPU usage increase for this case. Regards, ferruh