netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Dragos Tatulea <dtatulea@nvidia.com>
Cc: Jesper Dangaard Brouer <hawk@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
	Ilias Apalodimas <ilias.apalodimas@linaro.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	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: Tue, 23 Sep 2025 08:34:39 -0700	[thread overview]
Message-ID: <20250923083439.60c64f5e@kernel.org> (raw)
In-Reply-To: <ncerbfkwxgdwvu57kmbdvtndc6ruxhwlbsugxzx7xnyjg5f6rv@x2rqjadywnuk>

On Tue, 23 Sep 2025 15:23:02 +0000 Dragos Tatulea wrote:
> On Mon, Sep 22, 2025 at 04:18:27PM -0700, Jakub Kicinski wrote:
> > On Sat, 20 Sep 2025 09:25:31 +0000 Dragos Tatulea wrote:  
> > > The point is not to chase leaks but races from doing a recycle to cache
> > > from the wrong CPU. This is how XDP issue was caught where
> > > xdp_set_return_frame_no_direct() was not set appropriately for cpumap [1].
> > > 
> > > My first approach was to __page_pool_put_page() but then I figured that
> > > the warning should live closer to where the actual assignment happens.
> > > 
> > > [1] https://lore.kernel.org/all/e60404e2-4782-409f-8596-ae21ce7272c4@kernel.org/  
> > 
> > Ah, that thing. I wonder whether the complexity in the driver-facing 
> > xdp_return API is really worth the gain here. IIUC we want to extract
> > the cases where we're doing local recycling and let those cases use
> > the lockless cache. But all those cases should be caught by automatic
> > local recycling detection, so caller can just pass false..
> >  
> This patch was simply adding the debugging code to catch the potential
> misuse from any callers.
> 
> I was planning to send another patch for the xdp_return() API part
> once/if this one got accepted. If it makes more sense I can bundle them
> together in a RFC (as merge window is coming).

Combined RFC would make sense, yes.

But you get what I'm saying right? I'm questioning whether _rx_napi()
flavor of calls even make sense these days. If they don't I'd think
the drivers can't be wrong and the need for the debug check is
diminished?

  reply	other threads:[~2025-09-23 15:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-18  8:48 [PATCH net-next] page_pool: add debug for release to cache from wrong CPU Dragos Tatulea
2025-09-18  9:13 ` Sebastian Andrzej Siewior
2025-09-18  9:51   ` Dragos Tatulea
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 [this message]
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=20250923083439.60c64f5e@kernel.org \
    --to=kuba@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=clrkwllms@kernel.org \
    --cc=davem@davemloft.net \
    --cc=dtatulea@nvidia.com \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=ilias.apalodimas@linaro.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;
as well as URLs for NNTP newsgroup(s).