public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: Tariq Toukan <tariqt@nvidia.com>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>
Cc: Saeed Mahameed <saeedm@nvidia.com>,
	Mark Bloch <mbloch@nvidia.com>,
	"Leon Romanovsky" <leon@kernel.org>, <netdev@vger.kernel.org>,
	<linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	Gal Pressman <gal@nvidia.com>,
	Dragos Tatulea <dtatulea@nvidia.com>,
	Cosmin Ratiu <cratiu@nvidia.com>,
	Moshe Shemesh <moshe@nvidia.com>
Subject: Re: [PATCH net-next V2 2/2] net/mlx5e: SHAMPO, Improve allocation recovery
Date: Wed, 4 Feb 2026 14:57:04 -0800	[thread overview]
Message-ID: <25a26f19-7f8b-40fc-8528-64ad61e9fe25@intel.com> (raw)
In-Reply-To: <20260203072130.1710255-3-tariqt@nvidia.com>



On 2/2/2026 11:21 PM, Tariq Toukan wrote:
> From: Dragos Tatulea <dtatulea@nvidia.com>
> 
> When memory providers are used, there is a disconnect between the
> page_pool size and the available memory in the provider. This means
> that the page_pool can run out of memory if the user didn't provision
> a large enough buffer.
> 
> Under these conditions, mlx5 gets stuck trying to allocate new
> buffers without being able to release existing buffers. This happens due
> to the optimization introduced in commit 4c2a13236807
> ("net/mlx5e: RX, Defer page release in striding rq for better recycling")
> which delays WQE releases to increase the chance of page_pool direct
> recycling. The optimization was developed before memory providers
> existed and this circumstance was not considered.
> 
> This patch unblocks the queue by reclaiming pages from WQEs that can be
> freed and doing a one-shot retry. A WQE can be freed when:
> 1) All its strides have been consumed (WQE is no longer in linked list).
> 2) The WQE pages/netmems have not been previously released.
> 
> This reclaim mechanism is useful for regular pages as well.
> 
> Note that provisioning memory that can't fill even one MPWQE (64
> 4K pages) will still render the queue unusable. Same when
> the application doesn't release its buffers for various reasons.
> Or a combination of the two: a very small buffer is provisioned,
> application releases buffers in bulk, bulk size never reached
> => queue is stuck.
> 
> Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
> Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
> ---
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>

  reply	other threads:[~2026-02-04 22:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-03  7:21 [PATCH net-next V2 0/2] net/mlx5e: RX datapath enhancements Tariq Toukan
2026-02-03  7:21 ` [PATCH net-next V2 1/2] net/mlx5e: RX, Drop oversized packets in non-linear mode Tariq Toukan
2026-02-04 22:55   ` Jacob Keller
2026-02-03  7:21 ` [PATCH net-next V2 2/2] net/mlx5e: SHAMPO, Improve allocation recovery Tariq Toukan
2026-02-04 22:57   ` Jacob Keller [this message]
2026-02-05  5:30 ` [PATCH net-next V2 0/2] net/mlx5e: RX datapath enhancements patchwork-bot+netdevbpf

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=25a26f19-7f8b-40fc-8528-64ad61e9fe25@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=cratiu@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=dtatulea@nvidia.com \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.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=moshe@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=saeedm@nvidia.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox