From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: KNI latency improvement Date: Fri, 29 Dec 2017 09:13:45 -0800 Message-ID: <20171229091345.31022a59@xeon-e3> References: <0a4ff780-55fc-7c42-e3ab-b6b22a73cfbd@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: ferruh.yigit@intel.com, dev@dpdk.org To: Nirmoy Das Return-path: Received: from mail-pl0-f68.google.com (mail-pl0-f68.google.com [209.85.160.68]) by dpdk.org (Postfix) with ESMTP id E5E703250 for ; Fri, 29 Dec 2017 18:13:53 +0100 (CET) Received: by mail-pl0-f68.google.com with SMTP id s10so23250074plj.5 for ; Fri, 29 Dec 2017 09:13:53 -0800 (PST) In-Reply-To: <0a4ff780-55fc-7c42-e3ab-b6b22a73cfbd@suse.de> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, 29 Dec 2017 15:27:03 +0100 Nirmoy Das wrote: > Hi Ferruh, > > There is latency in the range of milliseconds when packets are passed > through KNI up to the IP stack. With CONFIG_RTE_KNI_PREEMPT_DEFAULT=n > its required sacrifice a cpu core. Do you have any suggestion to improve > latency without sacrificing a cpu? > > What do you think about using cond_resched() instead of > schedule_timeout_interruptible(), in our test it helped to reduce > latency? > That fully consumes a CPU core when doing KNI. It would be better to figure out how to use a a NAPI style API for this. I.e keep processing packet until idle, then poll for a small window more, then if still idle wait in kernel to be kicked by syscall from user space.