DPDK patches and discussions
 help / color / mirror / Atom feed
From: Yongseok Koh <yskoh@mellanox.com>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com, dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH] net/mlx5: poll completion queue once per a call
Date: Fri, 21 Jul 2017 18:10:07 +0300	[thread overview]
Message-ID: <20170721151006.GA38779@yongseok-MBP.local> (raw)
In-Reply-To: <fbc908a1-fe53-643d-0d3b-df688232d23c@grimberg.me>

On Thu, Jul 20, 2017 at 07:34:04PM +0300, Sagi Grimberg wrote:
> 
> > mlx5_tx_complete() polls completion queue multiple times until it
> > encounters an invalid entry. As Tx completions are suppressed by
> > MLX5_TX_COMP_THRESH, it is waste of cycles to expect multiple completions
> > in a poll. And freeing too many buffers in a call can cause high jitter.
> > This patch improves throughput a little.
> 
> What if the device generates burst of completions?
mlx5 PMD suppresses completions anyway. It requests a completion per every
MLX5_TX_COMP_THRESH Tx mbufs, not every single mbuf. So, the size of completion
queue is even much small.

> Holding these completions un-reaped can theoretically cause resource stress on
> the corresponding mempool(s).
Can you make your point clearer? Do you think the "stress" can impact
performance? I think stress doesn't matter unless it is depleted. And app is
responsible for supplying enough mbufs considering the depth of all queues (max
# of outstanding mbufs).

> I totally get the need for a stopping condition, but is "loop once"
> the best stop condition?
Best for what?

> Perhaps an adaptive budget (based on online stats) perform better?
Please bring up any suggestion or submit a patch if any. Does "budget" mean the
threshold? If so, calculation of stats for adaptive threshold can impact single
core performance. With multiple cores, adjusting threshold doesn't affect much.

Thanks,
Yongseok

  reply	other threads:[~2017-07-21 15:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-20 15:48 Yongseok Koh
2017-07-20 16:34 ` Sagi Grimberg
2017-07-21 15:10   ` Yongseok Koh [this message]
2017-07-23  9:49     ` Sagi Grimberg
2017-07-25  7:43       ` Yongseok Koh
2017-07-27 11:12         ` Sagi Grimberg
2017-07-28  0:26           ` Yongseok Koh
2017-07-31 16:12 ` 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=20170721151006.GA38779@yongseok-MBP.local \
    --to=yskoh@mellanox.com \
    --cc=adrien.mazarguil@6wind.com \
    --cc=dev@dpdk.org \
    --cc=nelio.laranjeiro@6wind.com \
    --cc=sagi@grimberg.me \
    /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).