DPDK patches and discussions
 help / color / mirror / Atom feed
From: Thomas Monjalon <thomas@monjalon.net>
To: Alexander Kozyrev <akozyrev@nvidia.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>,
	Raslan Darawsheh <rasland@nvidia.com>,
	Matan Azrad <matan@nvidia.com>,
	Slava Ovsiienko <viacheslavo@nvidia.com>,
	asafp@nvidia.com
Subject: Re: [dpdk-dev] [PATCH v2] net/mlx5: improve vMPRQ descriptors allocation locality
Date: Fri, 13 Nov 2020 18:58:36 +0100
Message-ID: <2341599.Mj1GBqBveQ@thomas> (raw)
In-Reply-To: <MWHPR12MB1501E9741F8080434986E897DFE90@MWHPR12MB1501.namprd12.prod.outlook.com>

> > There is a performance penalty for the replenish scheme used in vectorized Rx
> > burst for both MPRQ and SPRQ.
> > Mbuf elements are being filled at the end of the mbufs array and being
> > replenished at the beginning. That leads to an increase in cache misses and the
> > performance drop.
> > The more Rx descriptors are used the worse the situation.
> > 
> > Change the allocation scheme for vectorized MPRQ Rx burst:
> > allocate new mbufs only when consumed mbufs are almost depleted (always
> > have one burst gap between allocated and consumed indices). Keeping a small
> > number of mbufs allocated improves cache locality and improves performance
> > a lot.
> > 
> > Unfortunately, this approach cannot be applied to SPRQ Rx burst routine. In
> > MPRQ Rx burst we simply copy packets from external MPRQ buffers or attach
> > these buffers to mbufs.
> > In SPRQ Rx burst we allow the NIC to fill mbufs for us.
> > Hence keeping a small number of allocated mbufs will limit NIC ability to fill as
> > many buffers as possible. This fact offsets the advantage of better cache
> > locality.
> > 
> > Fixes: 0f20acbf5e ("net/mlx5: implement vectorized MPRQ burst")
> > 
> > Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
> Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>

Applied in next-net-mlx, thanks.



      reply	other threads:[~2020-11-13 17:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-06  0:04 [dpdk-dev] [PATCH] " Alexander Kozyrev
2020-11-08  4:23 ` [dpdk-dev] [PATCH v2] " Alexander Kozyrev
2020-11-10 16:30   ` Slava Ovsiienko
2020-11-13 17:58     ` Thomas Monjalon [this message]

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=2341599.Mj1GBqBveQ@thomas \
    --to=thomas@monjalon.net \
    --cc=akozyrev@nvidia.com \
    --cc=asafp@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=matan@nvidia.com \
    --cc=rasland@nvidia.com \
    --cc=viacheslavo@nvidia.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

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git