[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1d18f7dc-eca5-4daa-98fb-5c8d20ef6ac4@intel.com>
Date: Mon, 21 Jul 2025 16:51:10 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Dipayaan Roy <dipayanroy@...ux.microsoft.com>, <kuba@...nel.org>,
<kys@...rosoft.com>, <haiyangz@...rosoft.com>, <wei.liu@...nel.org>,
<decui@...rosoft.com>, <andrew+netdev@...n.ch>, <davem@...emloft.net>,
<edumazet@...gle.com>, <pabeni@...hat.com>, <longli@...rosoft.com>,
<kotaranov@...rosoft.com>, <horms@...nel.org>, <ast@...nel.org>,
<daniel@...earbox.net>, <hawk@...nel.org>, <john.fastabend@...il.com>,
<sdf@...ichev.me>, <lorenzo@...nel.org>, <michal.kubiak@...el.com>,
<ernis@...ux.microsoft.com>, <shradhagupta@...ux.microsoft.com>,
<shirazsaleem@...rosoft.com>, <rosenp@...il.com>, <netdev@...r.kernel.org>,
<linux-hyperv@...r.kernel.org>, <linux-rdma@...r.kernel.org>,
<bpf@...r.kernel.org>, <ssengar@...ux.microsoft.com>
Subject: Re: [PATCH] net: mana: Use page pool fragments for RX buffers instead
of full pages to improve memory efficiency and throughput.
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@...el.com>
Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (237 bytes)
Powered by blists - more mailing lists