From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 93203B64F for ; Tue, 17 Feb 2015 02:21:44 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 16 Feb 2015 17:21:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,591,1418112000"; d="scan'208";a="667267999" Received: from kmsmsx151.gar.corp.intel.com ([172.21.73.86]) by fmsmga001.fm.intel.com with ESMTP; 16 Feb 2015 17:21:37 -0800 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by KMSMSX151.gar.corp.intel.com (172.21.73.86) with Microsoft SMTP Server (TLS) id 14.3.195.1; Tue, 17 Feb 2015 09:21:32 +0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.161]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.197]) with mapi id 14.03.0195.001; Tue, 17 Feb 2015 09:21:31 +0800 From: "Zhang, Helin" To: Marc Sune , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2] Adding RTE_KNI_PREEMPT_DEFAULT configuration option Thread-Index: AQHQR5j/Fu9MPj+KL02vZefJvTNlxJz0EMfw Date: Tue, 17 Feb 2015 01:21:30 +0000 Message-ID: References: <1423837525-22283-1-git-send-email-marc.sune@bisdn.de> In-Reply-To: <1423837525-22283-1-git-send-email-marc.sune@bisdn.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v2] Adding RTE_KNI_PREEMPT_DEFAULT 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: Tue, 17 Feb 2015 01:21:45 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Marc Sune > Sent: Friday, February 13, 2015 10:25 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v2] Adding RTE_KNI_PREEMPT_DEFAULT > configuration option >=20 > This patch introduces CONFIG_RTE_KNI_PREEMPT_DEFAULT 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). >=20 > Default values is 'yes', maintaining the same behaviour as of now. >=20 > v2: CONFIG_RTE_KNI_PREEMPT -> CONFIG_RTE_KNI_PREEMPT_DEFAULT >=20 > Signed-off-by: Marc Sune Acked-by: Helin Zhang > --- > config/common_linuxapp | 1 + > lib/librte_eal/linuxapp/kni/kni_misc.c | 4 ++++ > 2 files changed, 5 insertions(+) >=20 > diff --git a/config/common_linuxapp b/config/common_linuxapp index > d428f84..72ba6ab 100644 > --- a/config/common_linuxapp > +++ b/config/common_linuxapp > @@ -359,6 +359,7 @@ CONFIG_RTE_LIBRTE_PIPELINE=3Dy # Compile > librte_kni # CONFIG_RTE_LIBRTE_KNI=3Dy > +CONFIG_RTE_KNI_PREEMPT_DEFAULT=3Dy > CONFIG_RTE_KNI_KO_DEBUG=3Dn > CONFIG_RTE_KNI_VHOST=3Dn > CONFIG_RTE_KNI_VHOST_MAX_CACHE_SIZE=3D1024 > diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c > b/lib/librte_eal/linuxapp/kni/kni_misc.c > index 868b325..1935d32 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_DEFAULT > /* reschedule out for a while */ > schedule_timeout_interruptible(usecs_to_jiffies( \ > KNI_KTHREAD_RESCHEDULE_INTERVAL)); > +#endif > } >=20 > return 0; > @@ -252,8 +254,10 @@ kni_thread_multiple(void *param) #endif > kni_net_poll_resp(dev); > } > +#ifdef RTE_KNI_PREEMPT_DEFAULT > schedule_timeout_interruptible(usecs_to_jiffies( \ > KNI_KTHREAD_RESCHEDULE_INTERVAL)); > +#endif > } >=20 > return 0; > -- > 2.1.4