DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: Honnappa Nagarahalli <Honnappa.Nagarahalli@arm.com>
Cc: Stanislaw Kardach <kda@semihalf.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	Frank Zhao <Frank.Zhao@starfivetech.com>,
	Sam Grove <sam.grove@sifive.com>,
	"mw@semihalf.com" <mw@semihalf.com>,
	"upstream@semihalf.com" <upstream@semihalf.com>, nd <nd@arm.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	"Ananyev, Konstantin" <konstantin.ananyev@intel.com>
Subject: Re: [PATCH 1/1] test/ring: remove excessive inlining
Date: Wed, 11 May 2022 10:14:51 +0100	[thread overview]
Message-ID: <Ynt+izB3GZ05OJGu@bricha3-MOBL.ger.corp.intel.com> (raw)
In-Reply-To: <DBAPR08MB5814A2D32DA177C1BE4FCDD798C99@DBAPR08MB5814.eurprd08.prod.outlook.com>

On Tue, May 10, 2022 at 11:23:53PM +0000, Honnappa Nagarahalli wrote:
> + Bruce, Stephen
> 
> <snip>
> 
> > 
> > Forcing inlining in test_ring_enqueue and test_ring_dequeue can cause the
> > compiled code to grow extensively when compiled with no optimization
> > (-O0 or -Og). This is default in the meson's debug configuration. This can collide
> > with compiler bugs and cause issues during linking of unit tests where the
> > api_type or esize are non-const variables causing inlining cascade. In perf tests
> > this is not the case in perf-tests as esize and api_type are const values.
> > 
> > One such case was discovered when porting DPDK to RISC-V. GCC 11.2 (and no
> > fix still in 12.1) is generating a short relative jump instruction (J <offset>) for
> > goto and for loops. When loop body grows extensively in ring test, the target
> > offset goes beyond supported offfset of +/- 1MB from PC. This is an obvious
> > bug in the GCC as RISC-V has a two-instruction construct to jump to any
> > absolute address (AUIPC+JALR).
> Is there a bug report created for this? Is it possible to add a link to the bug report?
> 
> > 
> > However there is no reason to force inlining as the test code works perfectly
> > fine without it.
> If this solves the problem, I prefer this as it is test code.
> 
+1 to this. I'm quite wary of changing the ring code itself.

  reply	other threads:[~2022-05-11  9:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-10 11:57 Stanislaw Kardach
2022-05-10 23:23 ` Honnappa Nagarahalli
2022-05-11  9:14   ` Bruce Richardson [this message]
2022-05-11 14:39   ` Stanisław Kardach
2022-05-11 15:07 ` [PATCH v2 " Stanislaw Kardach
2022-05-11 15:48   ` Bruce Richardson
2022-05-23 13:31     ` David Marchand
2022-05-11 16:51   ` Honnappa Nagarahalli
2022-05-19 22:50   ` Konstantin Ananyev

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=Ynt+izB3GZ05OJGu@bricha3-MOBL.ger.corp.intel.com \
    --to=bruce.richardson@intel.com \
    --cc=Frank.Zhao@starfivetech.com \
    --cc=Honnappa.Nagarahalli@arm.com \
    --cc=dev@dpdk.org \
    --cc=kda@semihalf.com \
    --cc=konstantin.ananyev@intel.com \
    --cc=mw@semihalf.com \
    --cc=nd@arm.com \
    --cc=sam.grove@sifive.com \
    --cc=stephen@networkplumber.org \
    --cc=upstream@semihalf.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).