config/arm: make SoC-generic more generic

Message ID 20221115020948.18356-1-fengchengwen@huawei.com (mailing list archive)
State Rejected, archived
Delegated to: Thomas Monjalon
Headers
Series config/arm: make SoC-generic more generic |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/iol-broadcom-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-x86_64-unit-testing success Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS

Commit Message

fengchengwen Nov. 15, 2022, 2:09 a.m. UTC
  The non-generic soc has 1280 max-lcores and 32 max-numas, but the
implementer-generic still has 256 max-lcores and 4 max-numas, which may
result in restrictions on the use of binaries compiled by soc-generic
in these systems.

This patch changes the soc-generic max-lcores to 1280 and max-numas to
32 to make it more generic.

Also, because single numa is a special case of multiple numas, mark
soc-generic's numa flag as true.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
---
 config/arm/meson.build | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
  

Comments

Jerin Jacob Nov. 15, 2022, 7:08 a.m. UTC | #1
On Tue, Nov 15, 2022 at 7:46 AM Chengwen Feng <fengchengwen@huawei.com> wrote:
>
> The non-generic soc has 1280 max-lcores and 32 max-numas, but the
> implementer-generic still has 256 max-lcores and 4 max-numas, which may
> result in restrictions on the use of binaries compiled by soc-generic
> in these systems.
>
> This patch changes the soc-generic max-lcores to 1280 and max-numas to
> 32 to make it more generic.

I think, it is not specific to ARM architecture issue. Even x86 config
set as below.
dpdk_conf.set('RTE_MAX_LCORE', 128)
dpdk_conf.set('RTE_MAX_NUMA_NODES', 32)

I think, it makes sense to keep generic as "most commonly used max"
per application, expectation cases can have separate config.

Also, this is for SINGLE application, even if you have 1280 cores a
single application most likely won't use that.
So in that way this patch is not needed.

>
> Also, because single numa is a special case of multiple numas, mark
> soc-generic's numa flag as true.
>
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> ---
>  config/arm/meson.build | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/config/arm/meson.build b/config/arm/meson.build
> index 6442ec9596..97b91cf609 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -32,8 +32,8 @@ implementer_generic = {
>      'flags': [
>          ['RTE_MACHINE', '"armv8a"'],
>          ['RTE_USE_C11_MEM_MODEL', true],
> -        ['RTE_MAX_LCORE', 256],
> -        ['RTE_MAX_NUMA_NODES', 4]
> +        ['RTE_MAX_LCORE', 1280],
> +        ['RTE_MAX_NUMA_NODES', 32]
>      ],
>      'part_number_config': {
>          'generic': {
> @@ -271,7 +271,8 @@ implementers = {
>  soc_generic = {
>      'description': 'Generic un-optimized build for armv8 aarch64 exec mode',
>      'implementer': 'generic',
> -    'part_number': 'generic'
> +    'part_number': 'generic',
> +    'numa': true
>  }
>
>  soc_generic_aarch32 = {
> --
> 2.17.1
>
  
fengchengwen Nov. 15, 2022, 7:55 a.m. UTC | #2
Hi Jerin,

On 2022/11/15 15:08, Jerin Jacob wrote:
> On Tue, Nov 15, 2022 at 7:46 AM Chengwen Feng <fengchengwen@huawei.com> wrote:
>>
>> The non-generic soc has 1280 max-lcores and 32 max-numas, but the
>> implementer-generic still has 256 max-lcores and 4 max-numas, which may
>> result in restrictions on the use of binaries compiled by soc-generic
>> in these systems.
>>
>> This patch changes the soc-generic max-lcores to 1280 and max-numas to
>> 32 to make it more generic.
> 
> I think, it is not specific to ARM architecture issue. Even x86 config
> set as below.
> dpdk_conf.set('RTE_MAX_LCORE', 128)
> dpdk_conf.set('RTE_MAX_NUMA_NODES', 32)
> 
> I think, it makes sense to keep generic as "most commonly used max"
> per application, expectation cases can have separate config.
> 
> Also, this is for SINGLE application, even if you have 1280 cores a
> single application most likely won't use that.
> So in that way this patch is not needed.

If we keep it, then dpdk application could not run with lcore >= 256

I have a test for it:
1. set RTE_MAX_LCORE to 64
2. run testpmd with lcore 80-81: ./build/native/app/dpdk-testpmd -a 0000:bd:00.0 --file-prefix=feng -l 80-81 -- -i
   it will display error:
     EAL: Detected CPU lcores: 64
     EAL: Detected NUMA nodes: 3
     EAL: lcore 80 >= RTE_MAX_LCORE (64)
     EAL: lcore 81 >= RTE_MAX_LCORE (64)
     EAL: To use high physical core ids, please use --lcores to map them to lcore ids below RTE_MAX_LCORE, e.g. --lcores 0@80,1@81
     EAL: invalid core list syntax

> 
>>
>> Also, because single numa is a special case of multiple numas, mark
>> soc-generic's numa flag as true.
>>
>> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
>> ---
>>  config/arm/meson.build | 7 ++++---
>>  1 file changed, 4 insertions(+), 3 deletions(-)
>>
>> diff --git a/config/arm/meson.build b/config/arm/meson.build
>> index 6442ec9596..97b91cf609 100644
>> --- a/config/arm/meson.build
>> +++ b/config/arm/meson.build
>> @@ -32,8 +32,8 @@ implementer_generic = {
>>      'flags': [
>>          ['RTE_MACHINE', '"armv8a"'],
>>          ['RTE_USE_C11_MEM_MODEL', true],
>> -        ['RTE_MAX_LCORE', 256],
>> -        ['RTE_MAX_NUMA_NODES', 4]
>> +        ['RTE_MAX_LCORE', 1280],
>> +        ['RTE_MAX_NUMA_NODES', 32]
>>      ],
>>      'part_number_config': {
>>          'generic': {
>> @@ -271,7 +271,8 @@ implementers = {
>>  soc_generic = {
>>      'description': 'Generic un-optimized build for armv8 aarch64 exec mode',
>>      'implementer': 'generic',
>> -    'part_number': 'generic'
>> +    'part_number': 'generic',
>> +    'numa': true
>>  }
>>
>>  soc_generic_aarch32 = {
>> --
>> 2.17.1
>>
> .
>
  
Ruifeng Wang Nov. 15, 2022, 8:20 a.m. UTC | #3
> -----Original Message-----
> From: fengchengwen <fengchengwen@huawei.com>
> Sent: Tuesday, November 15, 2022 3:55 PM
> To: Jerin Jacob <jerinjacobk@gmail.com>; Richardson, Bruce <bruce.richardson@intel.com>;
> Konstantin Ananyev <konstantin.v.ananyev@yandex.ru>
> Cc: thomas@monjalon.net; dev@dpdk.org; Ruifeng Wang <Ruifeng.Wang@arm.com>
> Subject: Re: [PATCH] config/arm: make SoC-generic more generic
> 
> Hi Jerin,
> 
> On 2022/11/15 15:08, Jerin Jacob wrote:
> > On Tue, Nov 15, 2022 at 7:46 AM Chengwen Feng <fengchengwen@huawei.com> wrote:
> >>
> >> The non-generic soc has 1280 max-lcores and 32 max-numas, but the
> >> implementer-generic still has 256 max-lcores and 4 max-numas, which
> >> may result in restrictions on the use of binaries compiled by
> >> soc-generic in these systems.
> >>
> >> This patch changes the soc-generic max-lcores to 1280 and max-numas
> >> to
> >> 32 to make it more generic.
> >
> > I think, it is not specific to ARM architecture issue. Even x86 config
> > set as below.
> > dpdk_conf.set('RTE_MAX_LCORE', 128)
> > dpdk_conf.set('RTE_MAX_NUMA_NODES', 32)
> >
> > I think, it makes sense to keep generic as "most commonly used max"
> > per application, expectation cases can have separate config.
> >
> > Also, this is for SINGLE application, even if you have 1280 cores a
> > single application most likely won't use that.
> > So in that way this patch is not needed.
> 
> If we keep it, then dpdk application could not run with lcore >= 256
> 
> I have a test for it:
> 1. set RTE_MAX_LCORE to 64
> 2. run testpmd with lcore 80-81: ./build/native/app/dpdk-testpmd -a 0000:bd:00.0 --file-
> prefix=feng -l 80-81 -- -i
>    it will display error:
>      EAL: Detected CPU lcores: 64
>      EAL: Detected NUMA nodes: 3
>      EAL: lcore 80 >= RTE_MAX_LCORE (64)
>      EAL: lcore 81 >= RTE_MAX_LCORE (64)
>      EAL: To use high physical core ids, please use --lcores to map them to lcore ids
> below RTE_MAX_LCORE, e.g. --lcores 0@80,1@81

Actually, EAL provides suggestions here. Physical cores above RTE_MAX_LCORE can be mapped and used.

>      EAL: invalid core list syntax
> 
> >
> >>
> >> Also, because single numa is a special case of multiple numas, mark
> >> soc-generic's numa flag as true.
> >>
> >> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> >> ---
> >>  config/arm/meson.build | 7 ++++---
> >>  1 file changed, 4 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/config/arm/meson.build b/config/arm/meson.build index
> >> 6442ec9596..97b91cf609 100644
> >> --- a/config/arm/meson.build
> >> +++ b/config/arm/meson.build
> >> @@ -32,8 +32,8 @@ implementer_generic = {
> >>      'flags': [
> >>          ['RTE_MACHINE', '"armv8a"'],
> >>          ['RTE_USE_C11_MEM_MODEL', true],
> >> -        ['RTE_MAX_LCORE', 256],
> >> -        ['RTE_MAX_NUMA_NODES', 4]
> >> +        ['RTE_MAX_LCORE', 1280],
> >> +        ['RTE_MAX_NUMA_NODES', 32]
> >>      ],
> >>      'part_number_config': {
> >>          'generic': {
> >> @@ -271,7 +271,8 @@ implementers = {
> >>  soc_generic = {
> >>      'description': 'Generic un-optimized build for armv8 aarch64 exec mode',
> >>      'implementer': 'generic',
> >> -    'part_number': 'generic'
> >> +    'part_number': 'generic',
> >> +    'numa': true
> >>  }
> >>
> >>  soc_generic_aarch32 = {
> >> --
> >> 2.17.1
> >>
> > .
> >
  

Patch

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 6442ec9596..97b91cf609 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -32,8 +32,8 @@  implementer_generic = {
     'flags': [
         ['RTE_MACHINE', '"armv8a"'],
         ['RTE_USE_C11_MEM_MODEL', true],
-        ['RTE_MAX_LCORE', 256],
-        ['RTE_MAX_NUMA_NODES', 4]
+        ['RTE_MAX_LCORE', 1280],
+        ['RTE_MAX_NUMA_NODES', 32]
     ],
     'part_number_config': {
         'generic': {
@@ -271,7 +271,8 @@  implementers = {
 soc_generic = {
     'description': 'Generic un-optimized build for armv8 aarch64 exec mode',
     'implementer': 'generic',
-    'part_number': 'generic'
+    'part_number': 'generic',
+    'numa': true
 }
 
 soc_generic_aarch32 = {