All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dragos Tatulea <dtatulea@nvidia.com>
To: Antonio Quartulli <antonio@mandelbit.com>
Cc: <netdev@vger.kernel.org>, <saeedm@nvidia.com>,
	<tariqt@nvidia.com>, <mbloch@nvidia.com>, <leon@kernel.org>,
	<cratiu@nvidia.com>, <andrew+netdev@lunn.ch>,
	<davem@davemloft.net>, <edumazet@kernel.org>, <kuba@kernel.org>,
	<pabeni@redhat.com>, <ast@kernel.org>, <daniel@iogearbox.net>,
	<hawk@kernel.org>, <john.fastabend@gmail.com>, <sdf@fomichev.me>,
	<linux-rdma@vger.kernel.org>, <bpf@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next v2] net/mlx5e: Prefetch the packet a few strides ahead in the linear MPWQE path
Date: Tue, 1 Dec 2026 13:20:31 +0200	[thread overview]
Message-ID: <20261201112031.2657332-1-dtatulea@nvidia.com> (raw)
In-Reply-To: <b201287c-002e-421b-880e-be1da8419e37@mandelbit.com>

On Thu, Nov 26, 2026 at 01:16:49 +0100, Antonio Quartulli wrote:
> Hi Dragos,
>
> On 25/11/2026 22:52, Dragos Tatulea wrote:
>> Overall I think these results are quite good. I was expecting to
>> see some issues at scale but nothing really stands out to be
>> honest.
>
> Well, thank you for running all of this on hardware I can't get my hands
> on!
>
>>
>> I wondered how much each prefetch bings and gathered some data
>> about that as well on the AMD system:
>>
>>                            v2    without   without   without
>>                                  page      headers   shinfo
>>    UDP 64B flood          +7%     +7%       +3%       +7%
>>    UDP 512B flood         +8%     +8%        0%       +8%
>>    TCP 1 stream          +18%    +17%        0%      +18%
>>    XDP_DROP read         +81%    +81%       -2%      +82%
>>    XDP_DROP no-touch      -6%     -6%       -4%       -5%
>>    XDP_TX               +106%   +106%       -1%      +108%
>>
>> It does look like the big bulk of the advantage comes from
>> the header fetch.
>
> Agreed, for these tests.
>
> The skb_shared_info prefetch pays off when the stack keeps each packet
> in its own skb: with TCP through an ovpn UDP tunnel on my setup it
> carries most of the gain (+34% with it, +4-5% without), while plain TCP
> and pktgen were within 2% either way, which matches what you see.
>
I was trying to reproduce this and am not able to see such a large diff.
Any steps on how to reproduce this?

I ran 3 ovpn tunnels over a single queue, one TCP stream per queue and
was a very small diff.

>>
>>> I'm also testing a small follow-up: v2 doesn't prefetch when the stride
>>> 4 ahead is in the next WQE, so the first strides of every WQE are never
>>> prefetched. Following the WQ list to the next WQE (only when
>>> cur_sz >= 2, so it is posted and its pages are allocated) removes 26-32%
>>> of the remaining DRAM demand fills on the RX CPU and adds 1.8-3.3%
>>> throughput, measured with TCP inside an ovpn UDP tunnel (where the RX
>>> CPU is the bottleneck); its latency is the "+next" column above.
>>>
>>> I had planned to send it as a follow-up patch, but I can also fold it in
>>> a v3, whatever you prefer once you have your results.
>>>
>> Do you have some results for this?
>
> Well... after running more extensive tests I came to the conclusion that
> my follow-up is not bringing any gain, despite what I anticipated.
>
> Therefore I'd just keep v2 as is.
>
Ack.

Thanks,
Dragos

  reply	other threads:[~2026-12-01 11:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-04 19:52 [PATCH net-next v2] net/mlx5e: Prefetch the packet a few strides ahead in the linear MPWQE path Antonio Quartulli
2026-11-06 10:55 ` Dragos Tatulea
2026-11-10 10:40   ` Antonio Quartulli
2026-11-25 21:52     ` Dragos Tatulea
2026-11-26  0:16       ` Antonio Quartulli
2026-12-01 11:20         ` Dragos Tatulea [this message]
2026-12-01 14:11           ` Antonio Quartulli
2026-11-26 13:43 ` Alexandre Cassen
2026-12-01 14:29   ` Antonio Quartulli

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=20261201112031.2657332-1-dtatulea@nvidia.com \
    --to=dtatulea@nvidia.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=antonio@mandelbit.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=cratiu@nvidia.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --cc=sdf@fomichev.me \
    --cc=tariqt@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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.