netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"bjorn.topel@intel.com" <bjorn.topel@intel.com>,
	"magnus.karlsson@intel.com" <magnus.karlsson@intel.com>,
	"brouer@redhat.com" <brouer@redhat.com>
Cc: Gal Pressman <galp@mellanox.com>,
	"borkmann@iogearbox.net" <borkmann@iogearbox.net>,
	Tariq Toukan <tariqt@mellanox.com>,
	"john.fastabend@gmail.com" <john.fastabend@gmail.com>,
	Eran Ben Elisha <eranbe@mellanox.com>,
	"alexei.starovoitov@gmail.com" <alexei.starovoitov@gmail.com>,
	Eugenia Emantayev <eugenia@mellanox.com>,
	"jasowang@redhat.com" <jasowang@redhat.com>
Subject: Re: [net-next V7 PATCH 14/16] mlx5: use page_pool for xdp_return_frame call
Date: Sat, 31 Mar 2018 00:11:10 +0000	[thread overview]
Message-ID: <1522455068.2252.29.camel@mellanox.com> (raw)
In-Reply-To: <152234292753.17048.10760047459039335176.stgit@firesoul>

On Thu, 2018-03-29 at 19:02 +0200, Jesper Dangaard Brouer wrote:
> This patch shows how it is possible to have both the driver local
> page
> cache, which uses elevated refcnt for "catching"/avoiding SKB
> put_page returns the page through the page allocator.  And at the
> same time, have pages getting returned to the page_pool from
> ndp_xdp_xmit DMA completion.
> 
> The performance improvement for XDP_REDIRECT in this patch is really
> good.  Especially considering that (currently) the xdp_return_frame
> API and page_pool_put_page() does per frame operations of both
> rhashtable ID-lookup and locked return into (page_pool) ptr_ring.
> (It is the plan to remove these per frame operation in a followup
> patchset).
> 
> The benchmark performed was RX on mlx5 and XDP_REDIRECT out ixgbe,
> with xdp_redirect_map (using devmap) . And the target/maximum
> capability of ixgbe is 13Mpps (on this HW setup).
> 
> Before this patch for mlx5, XDP redirected frames were returned via
> the page allocator.  The single flow performance was 6Mpps, and if I
> started two flows the collective performance drop to 4Mpps, because
> we
> hit the page allocator lock (further negative scaling occurs).
> 
> Two test scenarios need to be covered, for xdp_return_frame API,
> which
> is DMA-TX completion running on same-CPU or cross-CPU free/return.
> Results were same-CPU=10Mpps, and cross-CPU=12Mpps.  This is very
> close to our 13Mpps max target.
> 
> The reason max target isn't reached in cross-CPU test, is likely due
> to RX-ring DMA unmap/map overhead (which doesn't occur in ixgbe to
> ixgbe testing).  It is also planned to remove this unnecessary DMA
> unmap in a later patchset
> 
> V2: Adjustments requested by Tariq
>  - Changed page_pool_create return codes not return NULL, only
>    ERR_PTR, as this simplifies err handling in drivers.
>  - Save a branch in mlx5e_page_release
>  - Correct page_pool size calc for
> MLX5_WQ_TYPE_LINKED_LIST_STRIDING_RQ
> 
> V5: Updated patch desc
> 
> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
> Reviewed-by: Tariq Toukan <tariqt@mellanox.com>

Acked-by: Saeed Mahameed <saeedm@mellanox.com>

  reply	other threads:[~2018-03-31  0:11 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-29 17:00 [net-next V7 PATCH 00/16] XDP redirect memory return API Jesper Dangaard Brouer
2018-03-29 17:01 ` [net-next V7 PATCH 01/16] mlx5: basic XDP_REDIRECT forward support Jesper Dangaard Brouer
2018-03-31  0:08   ` Saeed Mahameed
2018-03-29 17:01 ` [net-next V7 PATCH 02/16] xdp: introduce xdp_return_frame API and use in cpumap Jesper Dangaard Brouer
2018-03-30 15:12   ` kbuild test robot
2018-03-29 17:01 ` [net-next V7 PATCH 03/16] ixgbe: use xdp_return_frame API Jesper Dangaard Brouer
2018-03-29 17:01 ` [net-next V7 PATCH 04/16] xdp: move struct xdp_buff from filter.h to xdp.h Jesper Dangaard Brouer
2018-03-29 17:01 ` [net-next V7 PATCH 05/16] xdp: introduce a new xdp_frame type Jesper Dangaard Brouer
2018-03-29 17:01 ` [net-next V7 PATCH 06/16] tun: convert to use generic xdp_frame and xdp_return_frame API Jesper Dangaard Brouer
2018-03-29 17:01 ` [net-next V7 PATCH 07/16] virtio_net: " Jesper Dangaard Brouer
2018-03-30 18:22   ` kbuild test robot
2018-03-31  8:56     ` Jesper Dangaard Brouer
2018-03-29 17:01 ` [net-next V7 PATCH 08/16] bpf: cpumap convert to use generic xdp_frame Jesper Dangaard Brouer
2018-03-29 17:01 ` [net-next V7 PATCH 09/16] i40e: convert to use generic xdp_frame and xdp_return_frame API Jesper Dangaard Brouer
2018-03-29 17:01 ` [net-next V7 PATCH 10/16] mlx5: register a memory model when XDP is enabled Jesper Dangaard Brouer
2018-03-31  0:09   ` Saeed Mahameed
2018-03-29 17:01 ` [net-next V7 PATCH 11/16] xdp: rhashtable with allocator ID to pointer mapping Jesper Dangaard Brouer
2018-03-30 19:07   ` [RFC PATCH] xdp: mem_id_pool can be static kbuild test robot
2018-03-30 19:07   ` [net-next V7 PATCH 11/16] xdp: rhashtable with allocator ID to pointer mapping kbuild test robot
2018-03-29 17:01 ` [net-next V7 PATCH 12/16] page_pool: refurbish version of page_pool code Jesper Dangaard Brouer
2018-03-30 14:25   ` kbuild test robot
2018-03-30 16:26   ` kbuild test robot
2018-03-30 19:58   ` [RFC PATCH] page_pool: page_pool_init() can be static kbuild test robot
2018-03-30 19:58   ` [net-next V7 PATCH 12/16] page_pool: refurbish version of page_pool code kbuild test robot
2018-03-29 17:02 ` [net-next V7 PATCH 13/16] xdp: allow page_pool as an allocator type in xdp_return_frame Jesper Dangaard Brouer
2018-03-29 17:02 ` [net-next V7 PATCH 14/16] mlx5: use page_pool for xdp_return_frame call Jesper Dangaard Brouer
2018-03-31  0:11   ` Saeed Mahameed [this message]
2018-03-29 17:02 ` [net-next V7 PATCH 15/16] xdp: transition into using xdp_frame for return API Jesper Dangaard Brouer
2018-03-29 17:02 ` [net-next V7 PATCH 16/16] xdp: transition into using xdp_frame for ndo_xdp_xmit Jesper Dangaard Brouer

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=1522455068.2252.29.camel@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=alexei.starovoitov@gmail.com \
    --cc=bjorn.topel@intel.com \
    --cc=borkmann@iogearbox.net \
    --cc=brouer@redhat.com \
    --cc=eranbe@mellanox.com \
    --cc=eugenia@mellanox.com \
    --cc=galp@mellanox.com \
    --cc=jasowang@redhat.com \
    --cc=john.fastabend@gmail.com \
    --cc=magnus.karlsson@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=tariqt@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).