DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Gaëtan Rivet" <gaetan.rivet@6wind.com>
To: Matan Azrad <matan@mellanox.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH v3 3/3] net/failsafe: improve Rx sub-devices iteration
Date: Fri, 12 Jan 2018 15:01:21 +0100	[thread overview]
Message-ID: <20180112140121.ps3qfcikaoz5qvxq@bidouze.vm.6wind.com> (raw)
In-Reply-To: <AM6PR0502MB379776910FCABB243ADF17FED2170@AM6PR0502MB3797.eurprd05.prod.outlook.com>

On Fri, Jan 12, 2018 at 01:29:17PM +0000, Matan Azrad wrote:
> Hi Gaetan
> 
> From: Gaëtan Rivet, Friday, January 12, 2018 12:29 PM
> > Hi Matan,
> > 
> > The other commits make sense to me so no issue there.
> > I'm just surprised by this one so a quick question.
> > 
> > On Tue, Dec 19, 2017 at 05:14:29PM +0000, Matan Azrad wrote:
> > > Connecting the sub-devices each other by cyclic linked list can help
> > > to iterate over them by Rx burst functions because there is no need to
> > > check the sub-devices ring wraparound.
> > >
> > > Create the aforementioned linked-list and change the Rx burst
> > > functions iteration accordingly.
> > 
> > I'm surprised that a linked-list iteration, with the usual dereferencing, is
> > better than doing some integer arithmetic.
> 
> This memory references are the same as the previous code because in the new code the linked list elements are still in continuous memory, so probably the addresses stay in the cache.
> The removed calculations and wraparound branch probably caused to the performance gain.
> 
> > Maybe the locality of the referenced data helps.
> > 
> Sure.

This means that the sub_device definition is critical for the datapath.
It probably goes beyond a cache-line and could be optimized.

> 
> > Anyway, were you able to count the cycles gained by this change? It might be
> > interesting to do a measure with a CPU-bound bench, such as with a dummy
> > device under the fail-safe (ring or such). MLX devices use a lot of PCI
> > bandwidth, so the bottleneck could be masked in a physical setting.
> > 
> > No comments otherwise, if you are sure that this is a performance gain, the
> > implementation seems ok to me.
> 
> Yes, I checked it and saw the little gain obviously.
> (just run the test with and without this patch and saw the statistics).

Oh I'm sure you checked, I just wanted to make sure you properly
considered the methodology.

Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>

-- 
Gaëtan Rivet
6WIND

  reply	other threads:[~2018-01-12 14:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-19 17:14 [dpdk-dev] [PATCH v3 0/3] improve failsafe performance Matan Azrad
2017-12-19 17:14 ` [dpdk-dev] [PATCH v3 1/3] net/failsafe: fix Rx safe check compiler hint Matan Azrad
2017-12-19 17:14 ` [dpdk-dev] [PATCH v3 2/3] net/failsafe: mitigate data plan atomic operations Matan Azrad
2017-12-19 17:14 ` [dpdk-dev] [PATCH v3 3/3] net/failsafe: improve Rx sub-devices iteration Matan Azrad
2018-01-12 10:28   ` Gaëtan Rivet
2018-01-12 13:29     ` Matan Azrad
2018-01-12 14:01       ` Gaëtan Rivet [this message]
2017-12-19 17:21 ` [dpdk-dev] [PATCH v3 0/3] improve failsafe performance Matan Azrad
2018-01-11 17:58 ` Ferruh Yigit
2018-01-12 10:14   ` Gaëtan Rivet
2018-01-12 15:10 ` Ferruh Yigit

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=20180112140121.ps3qfcikaoz5qvxq@bidouze.vm.6wind.com \
    --to=gaetan.rivet@6wind.com \
    --cc=dev@dpdk.org \
    --cc=matan@mellanox.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).