DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH] config: make AVX and AVX512 configurable
  2017-04-27 16:34 [dpdk-dev] [PATCH] config: make AVX and AVX512 configurable Zhihong Wang
@ 2017-04-27  9:08 ` Thomas Monjalon
  2017-04-27  9:18   ` Wang, Zhihong
  2017-04-27 23:00 ` [dpdk-dev] [PATCH v2] " Zhihong Wang
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2017-04-27  9:08 UTC (permalink / raw)
  To: Zhihong Wang, bruce.richardson; +Cc: dev, yuanhan.liu

27/04/2017 18:34, Zhihong Wang:
> Making AVX and AVX512 configurable is useful for performance and power
> testing.
> 
> The similar kernel patch at https://patchwork.kernel.org/patch/9618883/.
[...]
> +#
> +# Recognize/ignore the AVX/AVX512 CPU flags for performance/power testing
> +#
> +CONFIG_RTE_ENABLE_AVX=y
> +CONFIG_RTE_ENABLE_AVX512=n

It is disabling AVX512 in default configuration.
Please explain this behaviour change.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] config: make AVX and AVX512 configurable
  2017-04-27  9:08 ` Thomas Monjalon
@ 2017-04-27  9:18   ` Wang, Zhihong
  2017-04-27  9:20     ` Thomas Monjalon
  0 siblings, 1 reply; 9+ messages in thread
From: Wang, Zhihong @ 2017-04-27  9:18 UTC (permalink / raw)
  To: Thomas Monjalon, Richardson, Bruce; +Cc: dev, yuanhan.liu



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Thursday, April 27, 2017 5:08 PM
> To: Wang, Zhihong <zhihong.wang@intel.com>; Richardson, Bruce
> <bruce.richardson@intel.com>
> Cc: dev@dpdk.org; yuanhan.liu@linux.intel.com
> Subject: Re: [dpdk-dev] [PATCH] config: make AVX and AVX512 configurable
> 
> 27/04/2017 18:34, Zhihong Wang:
> > Making AVX and AVX512 configurable is useful for performance and power
> > testing.
> >
> > The similar kernel patch at https://patchwork.kernel.org/patch/9618883/.
> [...]
> > +#
> > +# Recognize/ignore the AVX/AVX512 CPU flags for performance/power
> testing
> > +#
> > +CONFIG_RTE_ENABLE_AVX=y
> > +CONFIG_RTE_ENABLE_AVX512=n
> 
> It is disabling AVX512 in default configuration.
> Please explain this behaviour change.

Though AVX512 rte_memcpy has been in DPDK for quite a while it's still
unproven in hardware with rich use cases. Mark it as experimental for
now, user can enable it for their own testing.

Will enable it with enough field tests and possible optimization.

Should I add the explanation in commit log, or comments in the source,
or both?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] config: make AVX and AVX512 configurable
  2017-04-27  9:18   ` Wang, Zhihong
@ 2017-04-27  9:20     ` Thomas Monjalon
  2017-04-27 10:03       ` Wang, Zhihong
  0 siblings, 1 reply; 9+ messages in thread
From: Thomas Monjalon @ 2017-04-27  9:20 UTC (permalink / raw)
  To: Wang, Zhihong; +Cc: Richardson, Bruce, dev, yuanhan.liu

27/04/2017 11:18, Wang, Zhihong:
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > 27/04/2017 18:34, Zhihong Wang:
> > > Making AVX and AVX512 configurable is useful for performance and power
> > > testing.
> > >
> > > The similar kernel patch at https://patchwork.kernel.org/patch/9618883/.
> > [...]
> > > +#
> > > +# Recognize/ignore the AVX/AVX512 CPU flags for performance/power
> > testing
> > > +#
> > > +CONFIG_RTE_ENABLE_AVX=y
> > > +CONFIG_RTE_ENABLE_AVX512=n
> > 
> > It is disabling AVX512 in default configuration.
> > Please explain this behaviour change.
> 
> Though AVX512 rte_memcpy has been in DPDK for quite a while it's still
> unproven in hardware with rich use cases. Mark it as experimental for
> now, user can enable it for their own testing.
> 
> Will enable it with enough field tests and possible optimization.
> 
> Should I add the explanation in commit log, or comments in the source,
> or both?

Yes please, add the explanation in the commit log and experimental comment
in the config.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH] config: make AVX and AVX512 configurable
  2017-04-27  9:20     ` Thomas Monjalon
@ 2017-04-27 10:03       ` Wang, Zhihong
  0 siblings, 0 replies; 9+ messages in thread
From: Wang, Zhihong @ 2017-04-27 10:03 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: Richardson, Bruce, dev, yuanhan.liu



> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Thursday, April 27, 2017 5:20 PM
> To: Wang, Zhihong <zhihong.wang@intel.com>
> Cc: Richardson, Bruce <bruce.richardson@intel.com>; dev@dpdk.org;
> yuanhan.liu@linux.intel.com
> Subject: Re: [dpdk-dev] [PATCH] config: make AVX and AVX512 configurable
> 
> 27/04/2017 11:18, Wang, Zhihong:
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > 27/04/2017 18:34, Zhihong Wang:
> > > > Making AVX and AVX512 configurable is useful for performance and
> power
> > > > testing.
> > > >
> > > > The similar kernel patch at
> https://patchwork.kernel.org/patch/9618883/.
> > > [...]
> > > > +#
> > > > +# Recognize/ignore the AVX/AVX512 CPU flags for
> performance/power
> > > testing
> > > > +#
> > > > +CONFIG_RTE_ENABLE_AVX=y
> > > > +CONFIG_RTE_ENABLE_AVX512=n
> > >
> > > It is disabling AVX512 in default configuration.
> > > Please explain this behaviour change.
> >
> > Though AVX512 rte_memcpy has been in DPDK for quite a while it's still
> > unproven in hardware with rich use cases. Mark it as experimental for
> > now, user can enable it for their own testing.
> >
> > Will enable it with enough field tests and possible optimization.
> >
> > Should I add the explanation in commit log, or comments in the source,
> > or both?
> 
> Yes please, add the explanation in the commit log and experimental
> comment
> in the config.

Thanks a lot! It's included in v2.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH] config: make AVX and AVX512 configurable
@ 2017-04-27 16:34 Zhihong Wang
  2017-04-27  9:08 ` Thomas Monjalon
  2017-04-27 23:00 ` [dpdk-dev] [PATCH v2] " Zhihong Wang
  0 siblings, 2 replies; 9+ messages in thread
From: Zhihong Wang @ 2017-04-27 16:34 UTC (permalink / raw)
  To: dev; +Cc: yuanhan.liu, thomas.monjalon, bruce.richardson, Zhihong Wang

Making AVX and AVX512 configurable is useful for performance and power
testing.

The similar kernel patch at https://patchwork.kernel.org/patch/9618883/.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
---
 config/common_base | 6 ++++++
 mk/rte.cpuflags.mk | 6 ++++++
 2 files changed, 12 insertions(+)

diff --git a/config/common_base b/config/common_base
index 0b4297c..9ca94a8 100644
--- a/config/common_base
+++ b/config/common_base
@@ -103,6 +103,12 @@ CONFIG_RTE_EAL_IGB_UIO=n
 CONFIG_RTE_EAL_VFIO=n
 CONFIG_RTE_MALLOC_DEBUG=n
 
+#
+# Recognize/ignore the AVX/AVX512 CPU flags for performance/power testing
+#
+CONFIG_RTE_ENABLE_AVX=y
+CONFIG_RTE_ENABLE_AVX512=n
+
 # Default driver path (or "" to disable)
 CONFIG_RTE_EAL_PMD_PATH=""
 
diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk
index e634abc..4288c14 100644
--- a/mk/rte.cpuflags.mk
+++ b/mk/rte.cpuflags.mk
@@ -70,8 +70,10 @@ CPUFLAGS += PCLMULQDQ
 endif
 
 ifneq ($(filter $(AUTO_CPUFLAGS),__AVX__),)
+ifeq ($(CONFIG_RTE_ENABLE_AVX),y)
 CPUFLAGS += AVX
 endif
+endif
 
 ifneq ($(filter $(AUTO_CPUFLAGS),__RDRND__),)
 CPUFLAGS += RDRAND
@@ -86,12 +88,16 @@ CPUFLAGS += F16C
 endif
 
 ifneq ($(filter $(AUTO_CPUFLAGS),__AVX2__),)
+ifeq ($(CONFIG_RTE_ENABLE_AVX),y)
 CPUFLAGS += AVX2
 endif
+endif
 
 ifneq ($(filter $(AUTO_CPUFLAGS),__AVX512F__),)
+ifeq ($(CONFIG_RTE_ENABLE_AVX512),y)
 CPUFLAGS += AVX512F
 endif
+endif
 
 # IBM Power CPU flags
 ifneq ($(filter $(AUTO_CPUFLAGS),__PPC64__),)
-- 
2.7.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [dpdk-dev] [PATCH v2] config: make AVX and AVX512 configurable
  2017-04-27 16:34 [dpdk-dev] [PATCH] config: make AVX and AVX512 configurable Zhihong Wang
  2017-04-27  9:08 ` Thomas Monjalon
@ 2017-04-27 23:00 ` Zhihong Wang
  2017-04-28  2:08   ` Yang, Zhiyong
  2017-04-28  5:07   ` Yuanhan Liu
  1 sibling, 2 replies; 9+ messages in thread
From: Zhihong Wang @ 2017-04-27 23:00 UTC (permalink / raw)
  To: dev; +Cc: yuanhan.liu, thomas, bruce.richardson, Zhihong Wang

Making AVX and AVX512 configurable is useful for performance and power
testing.

The similar kernel patch at https://patchwork.kernel.org/patch/9618883/.

AVX512 support like in rte_memcpy has been in DPDK since 16.04, but it's
still unproven in rich use cases in hardware. Therefore it's marked as
experimental for now, will enable it after enough field test and possible
optimization.

Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
---
Changes in v2:

 1. Add comments and explanation.

---
 config/common_base | 8 ++++++++
 mk/rte.cpuflags.mk | 6 ++++++
 2 files changed, 14 insertions(+)

diff --git a/config/common_base b/config/common_base
index 0b4297c..93e9235 100644
--- a/config/common_base
+++ b/config/common_base
@@ -103,6 +103,14 @@ CONFIG_RTE_EAL_IGB_UIO=n
 CONFIG_RTE_EAL_VFIO=n
 CONFIG_RTE_MALLOC_DEBUG=n
 
+#
+# Recognize/ignore the AVX/AVX512 CPU flags for performance/power testing.
+# AVX512 is marked as experimental for now, will enable it after enough
+# field test and possible optimization.
+#
+CONFIG_RTE_ENABLE_AVX=y
+CONFIG_RTE_ENABLE_AVX512=n
+
 # Default driver path (or "" to disable)
 CONFIG_RTE_EAL_PMD_PATH=""
 
diff --git a/mk/rte.cpuflags.mk b/mk/rte.cpuflags.mk
index e634abc..4288c14 100644
--- a/mk/rte.cpuflags.mk
+++ b/mk/rte.cpuflags.mk
@@ -70,8 +70,10 @@ CPUFLAGS += PCLMULQDQ
 endif
 
 ifneq ($(filter $(AUTO_CPUFLAGS),__AVX__),)
+ifeq ($(CONFIG_RTE_ENABLE_AVX),y)
 CPUFLAGS += AVX
 endif
+endif
 
 ifneq ($(filter $(AUTO_CPUFLAGS),__RDRND__),)
 CPUFLAGS += RDRAND
@@ -86,12 +88,16 @@ CPUFLAGS += F16C
 endif
 
 ifneq ($(filter $(AUTO_CPUFLAGS),__AVX2__),)
+ifeq ($(CONFIG_RTE_ENABLE_AVX),y)
 CPUFLAGS += AVX2
 endif
+endif
 
 ifneq ($(filter $(AUTO_CPUFLAGS),__AVX512F__),)
+ifeq ($(CONFIG_RTE_ENABLE_AVX512),y)
 CPUFLAGS += AVX512F
 endif
+endif
 
 # IBM Power CPU flags
 ifneq ($(filter $(AUTO_CPUFLAGS),__PPC64__),)
-- 
2.7.4

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] config: make AVX and AVX512 configurable
  2017-04-27 23:00 ` [dpdk-dev] [PATCH v2] " Zhihong Wang
@ 2017-04-28  2:08   ` Yang, Zhiyong
  2017-04-30 21:19     ` Thomas Monjalon
  2017-04-28  5:07   ` Yuanhan Liu
  1 sibling, 1 reply; 9+ messages in thread
From: Yang, Zhiyong @ 2017-04-28  2:08 UTC (permalink / raw)
  To: Wang, Zhihong, dev; +Cc: yuanhan.liu, thomas, Richardson, Bruce, Wang, Zhihong


> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhihong Wang
> Sent: Friday, April 28, 2017 7:00 AM
> To: dev@dpdk.org
> Cc: yuanhan.liu@linux.intel.com; thomas@monjalon.net; Richardson, Bruce
> <bruce.richardson@intel.com>; Wang, Zhihong <zhihong.wang@intel.com>
> Subject: [dpdk-dev] [PATCH v2] config: make AVX and AVX512 configurable
> 
> Making AVX and AVX512 configurable is useful for performance and power
> testing.
> 
> The similar kernel patch at https://patchwork.kernel.org/patch/9618883/.
> 
> AVX512 support like in rte_memcpy has been in DPDK since 16.04, but it's still
> unproven in rich use cases in hardware. Therefore it's marked as experimental
> for now, will enable it after enough field test and possible optimization.
> 
> Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
> ---

Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com>

Thanks
Zhiyong

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] config: make AVX and AVX512 configurable
  2017-04-27 23:00 ` [dpdk-dev] [PATCH v2] " Zhihong Wang
  2017-04-28  2:08   ` Yang, Zhiyong
@ 2017-04-28  5:07   ` Yuanhan Liu
  1 sibling, 0 replies; 9+ messages in thread
From: Yuanhan Liu @ 2017-04-28  5:07 UTC (permalink / raw)
  To: Zhihong Wang; +Cc: dev, thomas, bruce.richardson

On Thu, Apr 27, 2017 at 07:00:14PM -0400, Zhihong Wang wrote:
> Making AVX and AVX512 configurable is useful for performance and power
> testing.
> 
> The similar kernel patch at https://patchwork.kernel.org/patch/9618883/.
> 
> AVX512 support like in rte_memcpy has been in DPDK since 16.04, but it's
> still unproven in rich use cases in hardware. Therefore it's marked as
> experimental for now, will enable it after enough field test and possible
> optimization.
> 
> Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>

Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>

	--yliu

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [dpdk-dev] [PATCH v2] config: make AVX and AVX512 configurable
  2017-04-28  2:08   ` Yang, Zhiyong
@ 2017-04-30 21:19     ` Thomas Monjalon
  0 siblings, 0 replies; 9+ messages in thread
From: Thomas Monjalon @ 2017-04-30 21:19 UTC (permalink / raw)
  To: Wang, Zhihong; +Cc: dev, Yang, Zhiyong, yuanhan.liu, Richardson, Bruce

28/04/2017 04:08, Yang, Zhiyong:
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Zhihong Wang
> > 
> > Making AVX and AVX512 configurable is useful for performance and power
> > testing.
> > 
> > The similar kernel patch at https://patchwork.kernel.org/patch/9618883/.
> > 
> > AVX512 support like in rte_memcpy has been in DPDK since 16.04, but it's still
> > unproven in rich use cases in hardware. Therefore it's marked as experimental
> > for now, will enable it after enough field test and possible optimization.
> > 
> > Signed-off-by: Zhihong Wang <zhihong.wang@intel.com>
> 
> Reviewed-by: Zhiyong Yang <zhiyong.yang@intel.com>

Applied, thanks

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-04-30 21:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-27 16:34 [dpdk-dev] [PATCH] config: make AVX and AVX512 configurable Zhihong Wang
2017-04-27  9:08 ` Thomas Monjalon
2017-04-27  9:18   ` Wang, Zhihong
2017-04-27  9:20     ` Thomas Monjalon
2017-04-27 10:03       ` Wang, Zhihong
2017-04-27 23:00 ` [dpdk-dev] [PATCH v2] " Zhihong Wang
2017-04-28  2:08   ` Yang, Zhiyong
2017-04-30 21:19     ` Thomas Monjalon
2017-04-28  5:07   ` Yuanhan Liu

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).