From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by dpdk.org (Postfix) with ESMTP id E97391D7 for ; Fri, 29 Dec 2017 15:27:04 +0100 (CET) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 64373AAA3; Fri, 29 Dec 2017 14:27:04 +0000 (UTC) To: ferruh.yigit@intel.com Cc: dev@dpdk.org From: Nirmoy Das Message-ID: <0a4ff780-55fc-7c42-e3ab-b6b22a73cfbd@suse.de> Date: Fri, 29 Dec 2017 15:27:03 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] KNI latency improvement X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Dec 2017 14:27:05 -0000 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? Index: dpdk-stable-16.11.1/lib/librte_eal/linuxapp/kni/kni_misc.c =================================================================== --- dpdk/lib/librte_eal/linuxapp/kni/kni_misc.c +++ dpdk/lib/librte_eal/linuxapp/kni/kni_misc.c @@ -150,9 +150,8 @@ kni_thread_single(void *data) } up_read(&knet->kni_list_lock); #ifdef RTE_KNI_PREEMPT_DEFAULT - /* reschedule out for a while */ - schedule_timeout_interruptible( - usecs_to_jiffies(KNI_KTHREAD_RESCHEDULE_INTERVAL)); + /* reschedule out */ + cond_resched(); #endif } Regards, Nirmoy -- SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Maxfeldstr. 5 D-90409 Nürnberg / Phone: +49-911-740 18-4