DPDK patches and discussions
 help / color / mirror / Atom feed
From: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
To: Pavan Nikhilesh Bhagavatula <pbhagavatula@marvell.com>,
	"thomas@monjalon.net" <thomas@monjalon.net>
Cc: "jerinj@marvell.com" <jerinj@marvell.com>,
	"juraj.linkes@pantheon.tech" <juraj.linkes@pantheon.tech>,
	Jan Viktorin <viktorin@rehivetech.com>,
	Ruifeng Wang <Ruifeng.Wang@arm.com>,
	Bruce Richardson <bruce.richardson@intel.com>,
	"dev@dpdk.org" <dev@dpdk.org>, nd <nd@arm.com>,
	Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>,
	nd <nd@arm.com>
Subject: Re: [dpdk-dev] [EXT] Re: [PATCH] config/arm: add ability to express arch extensions
Date: Mon, 10 May 2021 17:20:54 +0000	[thread overview]
Message-ID: <DBAPR08MB5814C642E9365618159AE02998549@DBAPR08MB5814.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <PH0PR18MB408618B9BA2E0E64B6251BF1DE549@PH0PR18MB4086.namprd18.prod.outlook.com>

<snip>
> 
> >05/05/2021 14:14, pbhagavatula@marvell.com:
> >> From: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >>
> >> The ARM architecture allows SoCs to have extensions in addition to
> >> base profiles such as Large System Extension (LSE), CRC etc.
> >>
> >> Add ability to declare SoC specific extensions.
> >>
> >> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
> >
> >I don't know what it is fixing. It is an optimization?
> >Is it candidate for next release?
> 
> Its more of an enhancement, the default n2 march flag doesn't describe
> anything about the extensions that a specific SoC has.
> In case of OCTEON 10 SoC it has support for LSE and CRC in additional to the
> basic n2 profile.
> This patch allows SoC to add extensions to the -march flag.
> Default n2 march :    -march=armv8.5-a+crypto+sve2
> OCTEON 10 march :  -march=armv8.5-a+crypto+sve2+lse+crc
> 
> Including extensions in march helps compiler generate better code.
> Example adding '+lse' tells the compiler to inline C11 atomics rather than
> having a run time jump
> 
> https://gcc.godbolt.org/z/8hPv87dbr
Can you compile the code with armv8.5-a instead of armv8-a? I see that LSE instructions are used.
https://gcc.godbolt.org/z/18MYhY7xv

> 
> I don't think this is limited to OCTEON 10 other SoC should also add their
> extensions to march.
> 
> >
> >> ---
> >>
> >>  More details about ARM extensions
> >>  https://urldefense.proofpoint.com/v2/url?u=https-
> >3A__developer.arm.com_documentation_102378_0200&d=DwICAg&c
> >=nKjWec2b6R0mOyPaz7xtfQ&r=1cjuAHrGh745jHNmj2fD85sUMIJ2IPIDs
> >IJzo6FN6Z0&m=yCt4te5_7VJvaJT5OXrOpFXH3UBOUqRDlHZuSVEUZHM
> >&s=DquFBMwxMpjxWcM2Qw1c2t_ak-j6DN4rz8ce_I43RJk&e=
> >>
> >>  config/arm/meson.build | 8 ++++++++
> >>  1 file changed, 8 insertions(+)
> >>
> >> diff --git a/config/arm/meson.build b/config/arm/meson.build index
> >> 22cd81319..8aa961e5b 100644
> >> --- a/config/arm/meson.build
> >> +++ b/config/arm/meson.build
> >> @@ -230,6 +230,7 @@ soc_cn10k = {
> >>          ['RTE_MAX_LCORE', 24],
> >>          ['RTE_MAX_NUMA_NODES', 1]
> >>      ],
> >> +    'extensions' : ['lse', 'crc'],
> >>      'part_number': '0xd49',
> >>      'numa': false
> >>  }
> >> @@ -387,6 +388,7 @@ else
> >>      endif
> >>
> >>      soc_flags = []
> >> +    soc_extensions = []
> >>      if soc_config.has_key('not_supported')
> >>          error('SoC @0@ not supported.'.format(soc))
> >>      elif soc_config != {}
> >> @@ -394,6 +396,7 @@ else
> >>          implementer_config = implementers[implementer_id]
> >>          part_number = soc_config['part_number']
> >>          soc_flags = soc_config.get('flags', [])
> >> +        soc_extensions = soc_config.get('extensions', [])
> >>          if not soc_config.get('numa', true)
> >>              has_libnuma = 0
> >>          endif
> >> @@ -431,6 +434,11 @@ else
> >>      # apply supported machine args
> >>      machine_args = [] # Clear previous machine args
> >>      foreach flag: part_number_config['machine_args']
> >> +        if flag.startswith('-march') and soc_extensions.length() !=
> >> + 0
> >
> >Why condition on start with -march?
> 
> There are some implementer flags which don't have -march to add extensions
> to.
> 
> >
> >> +            foreach ex: soc_extensions
> >> +                flag += '+' + ex
> >> +            endforeach
> >> +        endif
> >
> >


  reply	other threads:[~2021-05-10 17:21 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-05 12:14 [dpdk-dev] " pbhagavatula
2021-05-05 12:27 ` Jerin Jacob
2021-05-10 13:13 ` Thomas Monjalon
2021-05-10 17:05   ` [dpdk-dev] [EXT] " Pavan Nikhilesh Bhagavatula
2021-05-10 17:20     ` Honnappa Nagarahalli [this message]
2021-05-10 17:48       ` Pavan Nikhilesh Bhagavatula
2021-05-10 21:09         ` Honnappa Nagarahalli
2021-05-10 21:28           ` Honnappa Nagarahalli
2021-05-11  8:57             ` Pavan Nikhilesh Bhagavatula
2021-05-11 17:08               ` Honnappa Nagarahalli
2021-05-11 18:50                 ` Pavan Nikhilesh Bhagavatula
2021-05-11 19:42                   ` Honnappa Nagarahalli
2021-05-12  9:17                     ` Pavan Nikhilesh Bhagavatula
2021-05-12  9:31                       ` Bruce Richardson
2021-05-14 11:45                         ` Juraj Linkeš
2021-05-18 13:20                           ` Honnappa Nagarahalli
2021-07-24  8:51                             ` Thomas Monjalon
2021-07-27 13:04                               ` Juraj Linkeš
2021-07-29 18:24                                 ` Pavan Nikhilesh Bhagavatula
2021-05-14 11:19                       ` Juraj Linkeš

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DBAPR08MB5814C642E9365618159AE02998549@DBAPR08MB5814.eurprd08.prod.outlook.com \
    --to=honnappa.nagarahalli@arm.com \
    --cc=Ruifeng.Wang@arm.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=jerinj@marvell.com \
    --cc=juraj.linkes@pantheon.tech \
    --cc=nd@arm.com \
    --cc=pbhagavatula@marvell.com \
    --cc=thomas@monjalon.net \
    --cc=viktorin@rehivetech.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).