DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] build: add -moutline-atomics to default Arm build
@ 2020-10-01  6:19 Juraj Linkeš
  2020-10-06 20:14 ` Thomas Monjalon
  2020-10-09  9:50 ` [dpdk-dev] [PATCH v2] " Juraj Linkeš
  0 siblings, 2 replies; 7+ messages in thread
From: Juraj Linkeš @ 2020-10-01  6:19 UTC (permalink / raw)
  To: bruce.richardson; +Cc: dev, Juraj Linkeš

-moutline-atomics allows LSE instructions to be used if available when
compiling for ARMv8.0 instruction set. It's enabled by default on newer
compilers, such as gcc-10.1. Enable the option so that earlier compiler
versions that support it but don't enable it by default build with it.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 8728051d5..b195ec850 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -88,7 +88,7 @@ flags_octeontx2_extra = [
 	['RTE_USE_C11_MEM_MODEL', true]]
 
 machine_args_generic = [
-	['default', ['-march=armv8-a+crc']],
+	['default', ['-march=armv8-a+crc', '-moutline-atomics']],
 	['native', ['-march=native']],
 	['0xd03', ['-mcpu=cortex-a53']],
 	['0xd04', ['-mcpu=cortex-a35']],
-- 
2.20.1


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

* Re: [dpdk-dev] [PATCH] build: add -moutline-atomics to default Arm build
  2020-10-01  6:19 [dpdk-dev] [PATCH] build: add -moutline-atomics to default Arm build Juraj Linkeš
@ 2020-10-06 20:14 ` Thomas Monjalon
  2020-10-09  5:29   ` Ruifeng Wang
  2020-10-09  9:50 ` [dpdk-dev] [PATCH v2] " Juraj Linkeš
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2020-10-06 20:14 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: bruce.richardson, dev, Jerin Jacob, Ruifeng Wang, honnappa.nagarahalli

01/10/2020 08:19, Juraj Linkeš:
> -moutline-atomics allows LSE instructions to be used if available when
> compiling for ARMv8.0 instruction set. It's enabled by default on newer
> compilers, such as gcc-10.1. Enable the option so that earlier compiler
> versions that support it but don't enable it by default build with it.
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> ---
>  machine_args_generic = [
> -	['default', ['-march=armv8-a+crc']],
> +	['default', ['-march=armv8-a+crc', '-moutline-atomics']],
>  	['native', ['-march=native']],
>  	['0xd03', ['-mcpu=cortex-a53']],
>  	['0xd04', ['-mcpu=cortex-a35']],

Why is it added only to the target "default"?



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

* Re: [dpdk-dev] [PATCH] build: add -moutline-atomics to default Arm build
  2020-10-06 20:14 ` Thomas Monjalon
@ 2020-10-09  5:29   ` Ruifeng Wang
  2020-10-09  6:52     ` Thomas Monjalon
  0 siblings, 1 reply; 7+ messages in thread
From: Ruifeng Wang @ 2020-10-09  5:29 UTC (permalink / raw)
  To: thomas, Juraj Linkeš
  Cc: bruce.richardson, dev, jerinj, Honnappa Nagarahalli, nd


> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Wednesday, October 7, 2020 4:14 AM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>
> Cc: bruce.richardson@intel.com; dev@dpdk.org; jerinj@marvell.com;
> Ruifeng Wang <Ruifeng.Wang@arm.com>; Honnappa Nagarahalli
> <Honnappa.Nagarahalli@arm.com>
> Subject: Re: [dpdk-dev] [PATCH] build: add -moutline-atomics to default Arm
> build
> 
> 01/10/2020 08:19, Juraj Linkeš:
> > -moutline-atomics allows LSE instructions to be used if available when
> > compiling for ARMv8.0 instruction set. It's enabled by default on
> > newer compilers, such as gcc-10.1. Enable the option so that earlier
> > compiler versions that support it but don't enable it by default build with it.
> >
> > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > ---
> >  machine_args_generic = [
> > -	['default', ['-march=armv8-a+crc']],
> > +	['default', ['-march=armv8-a+crc', '-moutline-atomics']],
> >  	['native', ['-march=native']],
> >  	['0xd03', ['-mcpu=cortex-a53']],
> >  	['0xd04', ['-mcpu=cortex-a35']],
> 
> Why is it added only to the target "default"?
> 
Because 'default' target generates Armv8.0 instruction set which doesn't include LSE extension. 
The flag enables LSE instructions when code runs on platforms that implements LSE extension.

For other targets, machine specific 'mcpu' or 'march' flags are used. LSE extension availability can be inferred from the given flags.
So there is not need to add '-moutline-atomics' to them. 

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

* Re: [dpdk-dev] [PATCH] build: add -moutline-atomics to default Arm build
  2020-10-09  5:29   ` Ruifeng Wang
@ 2020-10-09  6:52     ` Thomas Monjalon
  2020-10-09  7:07       ` Ruifeng Wang
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2020-10-09  6:52 UTC (permalink / raw)
  To: Juraj Linkeš, Ruifeng Wang
  Cc: bruce.richardson, dev, jerinj, Honnappa Nagarahalli, nd

09/10/2020 07:29, Ruifeng Wang:
> From: Thomas Monjalon <thomas@monjalon.net>
> > 01/10/2020 08:19, Juraj Linkeš:
> > > -moutline-atomics allows LSE instructions to be used if available when
> > > compiling for ARMv8.0 instruction set. It's enabled by default on
> > > newer compilers, such as gcc-10.1. Enable the option so that earlier
> > > compiler versions that support it but don't enable it by default build with it.
> > >
> > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > ---
> > >  machine_args_generic = [
> > > -	['default', ['-march=armv8-a+crc']],
> > > +	['default', ['-march=armv8-a+crc', '-moutline-atomics']],
> > >  	['native', ['-march=native']],
> > >  	['0xd03', ['-mcpu=cortex-a53']],
> > >  	['0xd04', ['-mcpu=cortex-a35']],
> > 
> > Why is it added only to the target "default"?
> > 
> Because 'default' target generates Armv8.0 instruction set which doesn't include LSE extension. 
> The flag enables LSE instructions when code runs on platforms that implements LSE extension.
> 
> For other targets, machine specific 'mcpu' or 'march' flags are used. LSE extension availability can be inferred from the given flags.
> So there is not need to add '-moutline-atomics' to them. 

OK
It's not obvious that the -mcpu flags implicitly include it.
What do you think adding such explanation in a v2?



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

* Re: [dpdk-dev] [PATCH] build: add -moutline-atomics to default Arm build
  2020-10-09  6:52     ` Thomas Monjalon
@ 2020-10-09  7:07       ` Ruifeng Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Ruifeng Wang @ 2020-10-09  7:07 UTC (permalink / raw)
  To: thomas, Juraj Linkeš
  Cc: bruce.richardson, dev, jerinj, Honnappa Nagarahalli, nd, nd


> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Friday, October 9, 2020 2:53 PM
> To: Juraj Linkeš <juraj.linkes@pantheon.tech>; Ruifeng Wang
> <Ruifeng.Wang@arm.com>
> Cc: bruce.richardson@intel.com; dev@dpdk.org; jerinj@marvell.com;
> Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>; nd <nd@arm.com>
> Subject: Re: [dpdk-dev] [PATCH] build: add -moutline-atomics to default Arm
> build
> 
> 09/10/2020 07:29, Ruifeng Wang:
> > From: Thomas Monjalon <thomas@monjalon.net>
> > > 01/10/2020 08:19, Juraj Linkeš:
> > > > -moutline-atomics allows LSE instructions to be used if available
> > > > when compiling for ARMv8.0 instruction set. It's enabled by
> > > > default on newer compilers, such as gcc-10.1. Enable the option so
> > > > that earlier compiler versions that support it but don't enable it by
> default build with it.
> > > >
> > > > Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
> > > > ---
> > > >  machine_args_generic = [
> > > > -	['default', ['-march=armv8-a+crc']],
> > > > +	['default', ['-march=armv8-a+crc', '-moutline-atomics']],
> > > >  	['native', ['-march=native']],
> > > >  	['0xd03', ['-mcpu=cortex-a53']],
> > > >  	['0xd04', ['-mcpu=cortex-a35']],
> > >
> > > Why is it added only to the target "default"?
> > >
> > Because 'default' target generates Armv8.0 instruction set which doesn't
> include LSE extension.
> > The flag enables LSE instructions when code runs on platforms that
> implements LSE extension.
> >
> > For other targets, machine specific 'mcpu' or 'march' flags are used. LSE
> extension availability can be inferred from the given flags.
> > So there is not need to add '-moutline-atomics' to them.
> 
> OK
> It's not obvious that the -mcpu flags implicitly include it.
> What do you think adding such explanation in a v2?
> 
Agree. Better to add explanation that this flag benefits distribution build which uses Armv8.0-a as baseline.
More information refer to: https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/making-the-most-of-the-arm-architecture-in-gcc-10


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

* [dpdk-dev] [PATCH v2] build: add -moutline-atomics to default Arm build
  2020-10-01  6:19 [dpdk-dev] [PATCH] build: add -moutline-atomics to default Arm build Juraj Linkeš
  2020-10-06 20:14 ` Thomas Monjalon
@ 2020-10-09  9:50 ` Juraj Linkeš
  2020-10-13 13:16   ` Thomas Monjalon
  1 sibling, 1 reply; 7+ messages in thread
From: Juraj Linkeš @ 2020-10-09  9:50 UTC (permalink / raw)
  To: bruce.richardson; +Cc: dev, Juraj Linkeš

-moutline-atomics allows LSE instructions to be used if available when
compiling for ARMv8.0 instruction set. It's enabled by default on newer
compilers, such as gcc-10.1. Enable the option in case an earlier
compiler version is used for the default build that lacks either -mcpu
or -mtune which would otherwise enable it.

Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>
---
 config/arm/meson.build | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 8728051d5..b195ec850 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -88,7 +88,7 @@ flags_octeontx2_extra = [
 	['RTE_USE_C11_MEM_MODEL', true]]
 
 machine_args_generic = [
-	['default', ['-march=armv8-a+crc']],
+	['default', ['-march=armv8-a+crc', '-moutline-atomics']],
 	['native', ['-march=native']],
 	['0xd03', ['-mcpu=cortex-a53']],
 	['0xd04', ['-mcpu=cortex-a35']],
-- 
2.20.1


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

* Re: [dpdk-dev] [PATCH v2] build: add -moutline-atomics to default Arm build
  2020-10-09  9:50 ` [dpdk-dev] [PATCH v2] " Juraj Linkeš
@ 2020-10-13 13:16   ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2020-10-13 13:16 UTC (permalink / raw)
  To: Juraj Linkeš
  Cc: bruce.richardson, dev, ruifeng.wang, honnappa.nagarahalli, jerinj

09/10/2020 11:50, Juraj Linkeš:
> -moutline-atomics allows LSE instructions to be used if available when
> compiling for ARMv8.0 instruction set. It's enabled by default on newer
> compilers, such as gcc-10.1. Enable the option in case an earlier
> compiler version is used for the default build that lacks either -mcpu
> or -mtune which would otherwise enable it.
> 
> Signed-off-by: Juraj Linkeš <juraj.linkes@pantheon.tech>

Applied, thanks

Note: Ruifeng should have been Cc'ed



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

end of thread, other threads:[~2020-10-13 13:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-01  6:19 [dpdk-dev] [PATCH] build: add -moutline-atomics to default Arm build Juraj Linkeš
2020-10-06 20:14 ` Thomas Monjalon
2020-10-09  5:29   ` Ruifeng Wang
2020-10-09  6:52     ` Thomas Monjalon
2020-10-09  7:07       ` Ruifeng Wang
2020-10-09  9:50 ` [dpdk-dev] [PATCH v2] " Juraj Linkeš
2020-10-13 13:16   ` Thomas Monjalon

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git