From: Tariq Toukan <tariqt@mellanox.com>
To: Jesper Dangaard Brouer <brouer@redhat.com>,
Saeed Mahameed <saeedm@mellanox.com>
Cc: iovisor-dev <iovisor-dev@lists.iovisor.org>,
netdev@vger.kernel.org, Brenden Blanco <bblanco@plumgrid.com>,
Alexei Starovoitov <alexei.starovoitov@gmail.com>,
Tom Herbert <tom@herbertland.com>,
Martin KaFai Lau <kafai@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Eric Dumazet <edumazet@google.com>,
Jamal Hadi Salim <jhs@mojatatu.com>,
linux-mm <linux-mm@kvack.org>
Subject: Re: [PATCH RFC 01/11] net/mlx5e: Single flow order-0 pages for Striding RQ
Date: Thu, 15 Sep 2016 17:28:18 +0300 [thread overview]
Message-ID: <375b9772-ca04-3024-dacd-1a7293e2ae3a@mellanox.com> (raw)
In-Reply-To: <20160907211840.36c37ea0@redhat.com>
Hi Jesper,
On 07/09/2016 10:18 PM, Jesper Dangaard Brouer wrote:
> On Wed, 7 Sep 2016 15:42:22 +0300 Saeed Mahameed <saeedm@mellanox.com> wrote:
>
>> From: Tariq Toukan <tariqt@mellanox.com>
>>
>> To improve the memory consumption scheme, we omit the flow that
>> demands and splits high-order pages in Striding RQ, and stay
>> with a single Striding RQ flow that uses order-0 pages.
> Thanks you for doing this! MM-list people thanks you!
Thanks. I've just submitted it to net-next.
> For others to understand what this means: This driver was doing
> split_page() on high-order pages (for Striding RQ). This was really bad
> because it will cause fragmenting the page-allocator, and depleting the
> high-order pages available quickly.
>
> (I've left rest of patch intact below, if some MM people should be
> interested in looking at the changes).
>
> There is even a funny comment in split_page() relevant to this:
>
> /* [...]
> * Note: this is probably too low level an operation for use in drivers.
> * Please consult with lkml before using this in your driver.
> */
>
>
>> Moving to fragmented memory allows the use of larger MPWQEs,
>> which reduces the number of UMR posts and filler CQEs.
>>
>> Moving to a single flow allows several optimizations that improve
>> performance, especially in production servers where we would
>> anyway fallback to order-0 allocations:
>> - inline functions that were called via function pointers.
>> - improve the UMR post process.
>>
>> This patch alone is expected to give a slight performance reduction.
>> However, the new memory scheme gives the possibility to use a page-cache
>> of a fair size, that doesn't inflate the memory footprint, which will
>> dramatically fix the reduction and even give a huge gain.
>>
>> We ran pktgen single-stream benchmarks, with iptables-raw-drop:
>>
>> Single stride, 64 bytes:
>> * 4,739,057 - baseline
>> * 4,749,550 - this patch
>> no reduction
>>
>> Larger packets, no page cross, 1024 bytes:
>> * 3,982,361 - baseline
>> * 3,845,682 - this patch
>> 3.5% reduction
>>
>> Larger packets, every 3rd packet crosses a page, 1500 bytes:
>> * 3,731,189 - baseline
>> * 3,579,414 - this patch
>> 4% reduction
>>
> Well, the reduction does not really matter than much, because your
> baseline benchmarks are from a freshly booted system, where you have
> not fragmented and depleted the high-order pages yet... ;-)
Indeed. On fragmented systems we'll get a gain, even w/o the page-cache
mechanism, as no time is wasted looking for high-order-pages.
>
>
>> Fixes: 461017cb006a ("net/mlx5e: Support RX multi-packet WQE (Striding RQ)")
>> Fixes: bc77b240b3c5 ("net/mlx5e: Add fragmented memory support for RX multi packet WQE")
>> Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
>> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
>> ---
>> drivers/net/ethernet/mellanox/mlx5/core/en.h | 54 ++--
>> drivers/net/ethernet/mellanox/mlx5/core/en_main.c | 136 ++++++++--
>> drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 292 ++++-----------------
>> drivers/net/ethernet/mellanox/mlx5/core/en_stats.h | 4 -
>> drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c | 2 +-
>> 5 files changed, 184 insertions(+), 304 deletions(-)
>>
Regards,
Tariq
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2016-09-15 14:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1473252152-11379-1-git-send-email-saeedm@mellanox.com>
[not found] ` <1473252152-11379-2-git-send-email-saeedm@mellanox.com>
2016-09-07 19:18 ` Jesper Dangaard Brouer
2016-09-15 14:28 ` Tariq Toukan [this message]
[not found] ` <1473252152-11379-5-git-send-email-saeedm@mellanox.com>
2016-09-07 19:32 ` [PATCH RFC 04/11] net/mlx5e: Build RX SKB on demand 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=375b9772-ca04-3024-dacd-1a7293e2ae3a@mellanox.com \
--to=tariqt@mellanox.com \
--cc=alexei.starovoitov@gmail.com \
--cc=bblanco@plumgrid.com \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=edumazet@google.com \
--cc=iovisor-dev@lists.iovisor.org \
--cc=jhs@mojatatu.com \
--cc=kafai@fb.com \
--cc=linux-mm@kvack.org \
--cc=netdev@vger.kernel.org \
--cc=saeedm@mellanox.com \
--cc=tom@herbertland.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