* [PATCH v2] Adding RTE_KNI_PREEMPT_DEFAULT configuration option
@ 2015-02-13 14:25 Marc Sune
[not found] ` <1423837525-22283-1-git-send-email-marc.sune-kpkqNMk1I7M@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Marc Sune @ 2015-02-13 14:25 UTC (permalink / raw)
To: dev-VfR2kkLFssw
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).
Default values is 'yes', maintaining the same behaviour as of now.
v2: CONFIG_RTE_KNI_PREEMPT -> CONFIG_RTE_KNI_PREEMPT_DEFAULT
Signed-off-by: Marc Sune <marc.sune-kpkqNMk1I7M@public.gmane.org>
---
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 d428f84..72ba6ab 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -359,6 +359,7 @@ CONFIG_RTE_LIBRTE_PIPELINE=y
# Compile librte_kni
#
CONFIG_RTE_LIBRTE_KNI=y
+CONFIG_RTE_KNI_PREEMPT_DEFAULT=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 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
}
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
}
return 0;
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <1423837525-22283-1-git-send-email-marc.sune-kpkqNMk1I7M@public.gmane.org>]
* Re: [PATCH v2] Adding RTE_KNI_PREEMPT_DEFAULT configuration option [not found] ` <1423837525-22283-1-git-send-email-marc.sune-kpkqNMk1I7M@public.gmane.org> @ 2015-02-17 1:21 ` Zhang, Helin [not found] ` <F35DEAC7BCE34641BA9FAC6BCA4A12E70A809527-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: Zhang, Helin @ 2015-02-17 1:21 UTC (permalink / raw) To: Marc Sune, dev-VfR2kkLFssw@public.gmane.org > -----Original Message----- > From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Marc Sune > Sent: Friday, February 13, 2015 10:25 PM > To: dev-VfR2kkLFssw@public.gmane.org > Subject: [dpdk-dev] [PATCH v2] Adding RTE_KNI_PREEMPT_DEFAULT > configuration option > > 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). > > Default values is 'yes', maintaining the same behaviour as of now. > > v2: CONFIG_RTE_KNI_PREEMPT -> CONFIG_RTE_KNI_PREEMPT_DEFAULT > > Signed-off-by: Marc Sune <marc.sune-kpkqNMk1I7M@public.gmane.org> Acked-by: Helin Zhang <helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> > --- > 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 > d428f84..72ba6ab 100644 > --- a/config/common_linuxapp > +++ b/config/common_linuxapp > @@ -359,6 +359,7 @@ CONFIG_RTE_LIBRTE_PIPELINE=y # Compile > librte_kni # CONFIG_RTE_LIBRTE_KNI=y > +CONFIG_RTE_KNI_PREEMPT_DEFAULT=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 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 > } > > 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 > } > > return 0; > -- > 2.1.4 ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <F35DEAC7BCE34641BA9FAC6BCA4A12E70A809527-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>]
* Re: [PATCH v2] Adding RTE_KNI_PREEMPT_DEFAULT configuration option [not found] ` <F35DEAC7BCE34641BA9FAC6BCA4A12E70A809527-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org> @ 2015-02-23 17:53 ` Thomas Monjalon 0 siblings, 0 replies; 3+ messages in thread From: Thomas Monjalon @ 2015-02-23 17:53 UTC (permalink / raw) To: Marc Sune; +Cc: dev-VfR2kkLFssw 2015-02-17 01:21, Zhang, Helin: > From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Marc Sune > > 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). > > > > Default values is 'yes', maintaining the same behaviour as of now. > > > > v2: CONFIG_RTE_KNI_PREEMPT -> CONFIG_RTE_KNI_PREEMPT_DEFAULT > > > > Signed-off-by: Marc Sune <marc.sune-kpkqNMk1I7M@public.gmane.org> > Acked-by: Helin Zhang <helin.zhang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Applied, thanks ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-02-23 17:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-13 14:25 [PATCH v2] Adding RTE_KNI_PREEMPT_DEFAULT configuration option Marc Sune
[not found] ` <1423837525-22283-1-git-send-email-marc.sune-kpkqNMk1I7M@public.gmane.org>
2015-02-17 1:21 ` Zhang, Helin
[not found] ` <F35DEAC7BCE34641BA9FAC6BCA4A12E70A809527-0J0gbvR4kTg/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2015-02-23 17:53 ` Thomas Monjalon
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).