From: Jesper Dangaard Brouer <brouer@redhat.com>
To: netdev@vger.kernel.org, BjörnTöpel <bjorn.topel@intel.com>,
magnus.karlsson@intel.com
Cc: eugenia@mellanox.com, Jason Wang <jasowang@redhat.com>,
John Fastabend <john.fastabend@gmail.com>,
Eran Ben Elisha <eranbe@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>,
galp@mellanox.com, Daniel Borkmann <borkmann@iogearbox.net>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Tariq Toukan <tariqt@mellanox.com>,
brouer@redhat.com
Subject: Re: [net-next V8 PATCH 14/16] mlx5: use page_pool for xdp_return_frame call
Date: Sat, 31 Mar 2018 14:11:55 +0200 [thread overview]
Message-ID: <20180331141155.3e781694@redhat.com> (raw)
In-Reply-To: <152249801785.28297.6249903576813529534.stgit@firesoul>
On Sat, 31 Mar 2018 14:06:57 +0200 Jesper Dangaard Brouer <brouer@redhat.com> 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
>
> V8: Adjust for b0cedc844c00 ("net/mlx5e: Remove rq_headroom field from params")
>
> Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
> Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Forgot to add Saeed's previous ACK from V7
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
next prev parent reply other threads:[~2018-03-31 12:12 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-31 12:05 [net-next V8 PATCH 00/16] XDP redirect memory return API Jesper Dangaard Brouer
2018-03-31 12:05 ` [net-next V8 PATCH 01/16] mlx5: basic XDP_REDIRECT forward support Jesper Dangaard Brouer
2018-04-01 3:31 ` David Miller
2018-04-01 8:46 ` Tariq Toukan
2018-03-31 12:05 ` [net-next V8 PATCH 02/16] xdp: introduce xdp_return_frame API and use in cpumap Jesper Dangaard Brouer
2018-03-31 12:06 ` [net-next V8 PATCH 03/16] ixgbe: use xdp_return_frame API Jesper Dangaard Brouer
2018-03-31 12:06 ` [net-next V8 PATCH 04/16] xdp: move struct xdp_buff from filter.h to xdp.h Jesper Dangaard Brouer
2018-03-31 12:06 ` [net-next V8 PATCH 05/16] xdp: introduce a new xdp_frame type Jesper Dangaard Brouer
2018-03-31 12:06 ` [net-next V8 PATCH 06/16] tun: convert to use generic xdp_frame and xdp_return_frame API Jesper Dangaard Brouer
2018-03-31 12:06 ` [net-next V8 PATCH 07/16] virtio_net: " Jesper Dangaard Brouer
2018-03-31 12:06 ` [net-next V8 PATCH 08/16] bpf: cpumap convert to use generic xdp_frame Jesper Dangaard Brouer
2018-03-31 12:06 ` [net-next V8 PATCH 09/16] i40e: convert to use generic xdp_frame and xdp_return_frame API Jesper Dangaard Brouer
2018-03-31 12:06 ` [net-next V8 PATCH 10/16] mlx5: register a memory model when XDP is enabled Jesper Dangaard Brouer
2018-03-31 12:06 ` [net-next V8 PATCH 11/16] xdp: rhashtable with allocator ID to pointer mapping Jesper Dangaard Brouer
2018-03-31 12:06 ` [net-next V8 PATCH 12/16] page_pool: refurbish version of page_pool code Jesper Dangaard Brouer
2018-03-31 12:06 ` [net-next V8 PATCH 13/16] xdp: allow page_pool as an allocator type in xdp_return_frame Jesper Dangaard Brouer
2018-04-01 3:32 ` David Miller
2018-03-31 12:06 ` [net-next V8 PATCH 14/16] mlx5: use page_pool for xdp_return_frame call Jesper Dangaard Brouer
2018-03-31 12:11 ` Jesper Dangaard Brouer [this message]
2018-03-31 12:07 ` [net-next V8 PATCH 15/16] xdp: transition into using xdp_frame for return API Jesper Dangaard Brouer
2018-03-31 12:07 ` [net-next V8 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=20180331141155.3e781694@redhat.com \
--to=brouer@redhat.com \
--cc=alexei.starovoitov@gmail.com \
--cc=bjorn.topel@intel.com \
--cc=borkmann@iogearbox.net \
--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=saeedm@mellanox.com \
--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).