From: Jacob Keller <jacob.e.keller@intel.com>
To: Dipayaan Roy <dipayanroy@linux.microsoft.com>, <kuba@kernel.org>,
<kys@microsoft.com>, <haiyangz@microsoft.com>,
<wei.liu@kernel.org>, <decui@microsoft.com>,
<andrew+netdev@lunn.ch>, <davem@davemloft.net>,
<edumazet@google.com>, <pabeni@redhat.com>,
<longli@microsoft.com>, <kotaranov@microsoft.com>,
<horms@kernel.org>, <ast@kernel.org>, <daniel@iogearbox.net>,
<hawk@kernel.org>, <john.fastabend@gmail.com>, <sdf@fomichev.me>,
<lorenzo@kernel.org>, <michal.kubiak@intel.com>,
<ernis@linux.microsoft.com>, <shradhagupta@linux.microsoft.com>,
<shirazsaleem@microsoft.com>, <rosenp@gmail.com>,
<netdev@vger.kernel.org>, <linux-hyperv@vger.kernel.org>,
<linux-rdma@vger.kernel.org>, <bpf@vger.kernel.org>,
<ssengar@linux.microsoft.com>
Subject: Re: [PATCH] net: mana: Use page pool fragments for RX buffers instead of full pages to improve memory efficiency and throughput.
Date: Mon, 21 Jul 2025 16:51:10 -0700 [thread overview]
Message-ID: <1d18f7dc-eca5-4daa-98fb-5c8d20ef6ac4@intel.com> (raw)
In-Reply-To: <20250721101417.GA18873@linuxonhyperv3.guj3yctzbm1etfxqx2vob5hsef.xx.internal.cloudapp.net>
[-- Attachment #1.1: Type: text/plain, Size: 1516 bytes --]
On 7/21/2025 3:14 AM, Dipayaan Roy wrote:
> This patch enhances RX buffer handling in the mana driver by allocating
> pages from a page pool and slicing them into MTU-sized fragments, rather
> than dedicating a full page per packet. This approach is especially
> beneficial on systems with 64KB page sizes.
>
> Key improvements:
>
> - Proper integration of page pool for RX buffer allocations.
> - MTU-sized buffer slicing to improve memory utilization.
> - Reduce overall per Rx queue memory footprint.
> - Automatic fallback to full-page buffers when:
> * Jumbo frames are enabled (MTU > PAGE_SIZE / 2).
> * The XDP path is active, to avoid complexities with fragment reuse.
> - Removal of redundant pre-allocated RX buffers used in scenarios like MTU
> changes, ensuring consistency in RX buffer allocation.
>
> Testing on VMs with 64KB pages shows around 200% throughput improvement.
> Memory efficiency is significantly improved due to reduced wastage in page
> allocations. Example: We are now able to fit 35 Rx buffers in a single 64KB
> page for MTU size of 1500, instead of 1 Rx buffer per page previously.
>
Nice to see such improvements while also reducing the overall driver
code footprint!
Do you happen to have numbers on some of the smaller page sizes? I'm not
sure how common 64KB is, but it seems like this would still be quite
beneficial even if you had 4K or 8K pages when operating at 1500 MTU.
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
next prev parent reply other threads:[~2025-07-21 23:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 10:14 [PATCH] net: mana: Use page pool fragments for RX buffers instead of full pages to improve memory efficiency and throughput Dipayaan Roy
2025-07-21 23:51 ` Jacob Keller [this message]
2025-07-23 18:22 ` Dipayaan Roy
2025-07-23 20:22 ` Jacob Keller
2025-07-22 11:19 ` Simon Horman
2025-07-23 18:35 ` Dipayaan Roy
2025-07-23 7:38 ` Saurabh Singh Sengar
2025-07-23 18:57 ` Dipayaan Roy
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=1d18f7dc-eca5-4daa-98fb-5c8d20ef6ac4@intel.com \
--to=jacob.e.keller@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=decui@microsoft.com \
--cc=dipayanroy@linux.microsoft.com \
--cc=edumazet@google.com \
--cc=ernis@linux.microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kotaranov@microsoft.com \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=longli@microsoft.com \
--cc=lorenzo@kernel.org \
--cc=michal.kubiak@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rosenp@gmail.com \
--cc=sdf@fomichev.me \
--cc=shirazsaleem@microsoft.com \
--cc=shradhagupta@linux.microsoft.com \
--cc=ssengar@linux.microsoft.com \
--cc=wei.liu@kernel.org \
/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