From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx.bisdn.de (mx.bisdn.de [185.27.182.31]) by dpdk.org (Postfix) with ESMTP id C34B62E89 for ; Thu, 6 Nov 2014 19:11:08 +0100 (CET) Received: from [192.168.1.43] (42.Red-79-146-253.dynamicIP.rima-tde.net [79.146.253.42]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.bisdn.de (Postfix) with ESMTPSA id 946E9A09C5 for ; Thu, 6 Nov 2014 19:20:36 +0100 (CET) Message-ID: <545BBBF4.7010501@bisdn.de> Date: Thu, 06 Nov 2014 19:20:36 +0100 From: Marc Sune User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 MIME-Version: 1.0 To: "" References: <1415146642-24717-1-git-send-email-marc.sune@bisdn.de> In-Reply-To: <1415146642-24717-1-git-send-email-marc.sune@bisdn.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [RFC PATCH] Adding RTE_KNI_PREEMPT configuration option 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, 06 Nov 2014 18:11:09 -0000 Hi guys, Any comment, suggestion or objection to this patch? Otherwise I would send a non-RFC patch Thanks Marc On 05/11/14 01:17, Marc Sune wrote: > This patch introduces CONFIG_RTE_KNI_PREEMPT flag. When set to 'no', KNI > kernel thread(s) do not call schedule_timeout_interruptible(), which improves > overall KNI performance at the expense of CPU cycles (polling). > > Default values is 'yes', maintaining the same behaviour as of now. > > Note: this RFC patch is based on v1.7.1, since I was using a 1.7 application. > It will eventually be rebased to 1.8 upon acceptance. > > Signed-off-by: Marc Sune > --- > config/common_linuxapp | 1 + > lib/librte_eal/linuxapp/kni/kni_misc.c | 4 ++++ > 2 files changed, 5 insertions(+) > > diff --git a/config/common_linuxapp b/config/common_linuxapp > index 9047975..9cebcf1 100644 > --- a/config/common_linuxapp > +++ b/config/common_linuxapp > @@ -382,6 +382,7 @@ CONFIG_RTE_LIBRTE_PIPELINE=y > # Compile librte_kni > # > CONFIG_RTE_LIBRTE_KNI=y > +CONFIG_RTE_KNI_PREEMPT=y > CONFIG_RTE_KNI_KO_DEBUG=n > CONFIG_RTE_KNI_VHOST=n > CONFIG_RTE_KNI_VHOST_MAX_CACHE_SIZE=1024 > diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c > index ba77776..e7e6c27 100644 > --- a/lib/librte_eal/linuxapp/kni/kni_misc.c > +++ b/lib/librte_eal/linuxapp/kni/kni_misc.c > @@ -229,9 +229,11 @@ kni_thread_single(void *unused) > } > } > up_read(&kni_list_lock); > +#ifdef RTE_KNI_PREEMPT > /* reschedule out for a while */ > schedule_timeout_interruptible(usecs_to_jiffies( \ > KNI_KTHREAD_RESCHEDULE_INTERVAL)); > +#endif > } > > return 0; > @@ -252,8 +254,10 @@ kni_thread_multiple(void *param) > #endif > kni_net_poll_resp(dev); > } > +#ifdef RTE_KNI_PREEMPT > schedule_timeout_interruptible(usecs_to_jiffies( \ > KNI_KTHREAD_RESCHEDULE_INTERVAL)); > +#endif > } > > return 0;