From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: Potential deadlock in KNI RX path Date: Thu, 7 Apr 2016 15:33:41 +0100 Message-ID: <57066FC5.6000900@intel.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: Neil Horman To: Jay Rolette , DPDK 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) In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 comme= nt: >=20 > http://dpdk.org/ml/archives/dev/2015-March/015783.html >=20 > Looking at the current code base, it is still calling netif_rx() instea= d of > netif_rx_ni() as suggested. >=20 > Did that fall through the cracks or is there disagreement about whether= it > was the right thing to do? >=20 > Thanks, > Jay >=20 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