From: Matthew Wilcox <willy@infradead.org>
To: Hannes Reinecke <hare@suse.de>
Cc: Jakub Kicinski <kuba@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
netdev@vger.kernel.org, Vlastimil Babka <vbabka@suse.cz>,
linux-mm@kvack.org
Subject: Re: [PATCH] mm: Decline to manipulate the refcount on a slab page
Date: Tue, 11 Mar 2025 16:59:53 +0000 [thread overview]
Message-ID: <Z9BsCZ_aOozA5Al9@casper.infradead.org> (raw)
In-Reply-To: <4fc21641-e258-474b-9409-4949fe2fda2d@suse.de>
On Tue, Mar 11, 2025 at 04:46:45PM +0100, Hannes Reinecke wrote:
> On 3/11/25 11:15, Jakub Kicinski wrote:
> > On Mon, 10 Mar 2025 14:35:24 +0000 Matthew Wilcox (Oracle) wrote:
> > > Long-term, networking needs to stop taking a refcount on the pages that
> > > it uses and rely on the caller to hold whatever references are necessary
> > > to make the memory stable.
> >
> > TBH I'm not clear on who is going to fix this.
> > IIRC we already told NVMe people that sending slab memory over sendpage
> > is not well supported. Plus the bug is in BPF integration, judging by
> > the stack traces (skmsg is a BPF thing). Joy.
>
> Hmm. Did you? Seem to have missed it.
> We make sure to not do it via the 'sendpage_ok()' call; but other than
> that it's not much we can do.
>
> And BPF is probably not the culprit; issue here is that we have a kvec,
> package it into a bio (where it gets converted into a bvec),
> and then call an iov iterator in tls_sw to get to the pages.
> But at that stage we only see the bvec iterator, and the information
> that it was an kvec to start with has been lost.
So I have two questions:
Hannes:
- Why does nvme need to turn the kvec into a bio rather than just
send it directly?
Jakub:
- Why does the socket code think it needs to get a refcount on a bvec
at all, since the block layer doesn't?
next prev parent reply other threads:[~2025-03-11 17:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 14:35 Matthew Wilcox (Oracle)
2025-03-10 14:37 ` Vlastimil Babka
2025-03-10 14:50 ` Matthew Wilcox
2025-03-11 10:15 ` Jakub Kicinski
2025-03-11 15:46 ` Hannes Reinecke
2025-03-11 16:59 ` Matthew Wilcox [this message]
2025-03-12 5:48 ` Christoph Hellwig
2025-03-13 7:22 ` Hannes Reinecke
2025-03-13 7:36 ` Christoph Hellwig
2025-03-13 8:34 ` Hannes Reinecke
2025-03-13 8:44 ` Christoph Hellwig
2025-03-13 8:52 ` Hannes Reinecke
2025-03-13 9:15 ` Christoph Hellwig
2025-03-12 5:47 ` Christoph Hellwig
[not found] <20250310142750.1209192-1-willy@infradead.org>
[not found] ` <77fa8d7e-4752-4979-affe-aa45c8d7795a@suse.de>
[not found] ` <Z88vUFweLyk5s8UD@casper.infradead.org>
2025-03-11 7:05 ` Hannes Reinecke
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=Z9BsCZ_aOozA5Al9@casper.infradead.org \
--to=willy@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=hare@suse.de \
--cc=kuba@kernel.org \
--cc=linux-mm@kvack.org \
--cc=netdev@vger.kernel.org \
--cc=vbabka@suse.cz \
/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