mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dragos Tatulea <dtatulea@nvidia.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: Jesper Dangaard Brouer <hawk@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Simon Horman <horms@kernel.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Clark Williams <clrkwllms@kernel.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	netdev@vger.kernel.org, Tariq Toukan <tariqt@nvidia.com>,
	linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH net-next] page_pool: add debug for release to cache from wrong CPU
Date: Thu, 18 Sep 2025 12:51:42 +0300	[thread overview]
Message-ID: <c7ac9e7d-2311-46cb-8c34-aba2f010c2c0@nvidia.com> (raw)
In-Reply-To: <20250918091341.n6_OgbOW@linutronix.de>



On 18.09.25 12:13, Sebastian Andrzej Siewior wrote:
> On 2025-09-18 11:48:21 [+0300], Dragos Tatulea wrote:
>> diff --git a/net/core/page_pool.c b/net/core/page_pool.c
>> index ba70569bd4b0..404064d893d6 100644
>> --- a/net/core/page_pool.c
>> +++ b/net/core/page_pool.c
>> @@ -768,6 +795,18 @@ static bool page_pool_recycle_in_cache(netmem_ref netmem,
>>  		return false;
>>  	}
>>  
>> +#ifdef CONFIG_DEBUG_PAGE_POOL_CACHE_RELEASE
>> +	if (unlikely(!page_pool_napi_local(pool))) {
> 
> if you do IS_ENABLED(CONFIG_DEBUG_PAGE_POOL_CACHE_RELEASE) you could
> avoid the ifdef.
>
Ack. Makes sense. 
> A quick question, where is this allow_direct argument supposed to come
> from? I just noticed that mlx5 does
>    page_pool_put_unrefed_netmem(, true);
> 
> which then does not consider page_pool_napi_local(). But your proposed
> change here will complain as it should.
>

Good point and an oversight on my behalf. It will indeed complain during
rq teardown. If there is agreement on the approach proposed here then the
mlx5 driver will be changed to set the flag to false during teardown.
We used to do that but removed it for simplicity.

Thanks,
Dragos

  reply	other threads:[~2025-09-18  9:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-18  8:48 Dragos Tatulea
2025-09-18  9:13 ` Sebastian Andrzej Siewior
2025-09-18  9:51   ` Dragos Tatulea [this message]
2025-09-19 23:57 ` Jakub Kicinski
2025-09-20  9:25   ` Dragos Tatulea
2025-09-22 23:18     ` Jakub Kicinski
2025-09-23 15:23       ` Dragos Tatulea
2025-09-23 15:34         ` Jakub Kicinski
2025-09-23 16:00           ` Dragos Tatulea
2025-09-23 23:26             ` Jakub Kicinski
2025-09-20 17:36 ` Jesper Dangaard Brouer
2025-09-22 17:18   ` Dragos Tatulea

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=c7ac9e7d-2311-46cb-8c34-aba2f010c2c0@nvidia.com \
    --to=dtatulea@nvidia.com \
    --cc=bigeasy@linutronix.de \
    --cc=clrkwllms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-devel@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rostedt@goodmis.org \
    --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

all inboxes | Powered by JetHome®