From: Jakub Kicinski <kuba@kernel.org>
To: Mina Almasry <almasrymina@google.com>
Cc: netdev@vger.kernel.org, Pavel Begunkov <asml.silence@gmail.com>,
Kaiyuan Zhang <kaiyuanz@google.com>,
Willem de Bruijn <willemb@google.com>,
Samiullah Khawaja <skhawaja@google.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Jesper Dangaard Brouer <hawk@kernel.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>
Subject: Re: [PATCH net-next v3 5/5] net: Document memory provider driver support
Date: Wed, 11 Dec 2024 18:28:13 -0800 [thread overview]
Message-ID: <20241211182813.789616ce@kernel.org> (raw)
In-Reply-To: <CAHS8izOHfWPGaAF0Ri6sN5SVbvD9k_u2-_WmHJHcwu4HDEXj-Q@mail.gmail.com>
On Wed, 11 Dec 2024 09:53:36 -0800 Mina Almasry wrote:
> Drivers doing their own recycling is not currently supported, AFAICT.
> Adding support for it in the future and maintaining it is doable, but
> a headache. I also noticed with IDPF you're nacking drivers doing
> their own recycling anyway, so I thought why not just declare all such
> use cases as not supported to make the whole thing much simpler.
> Drivers can deprecate their recycling while adding support for netmem
> which brings them in line with what you're enforcing for new drivers
> anyway.
IIRC IDPF was doing recycling based on the old page ref tricks,
without any use of page pool at all. But without using page pool
the driver will never acquire a netmem_ref in the first place.
> The specific reason: currently drivers will get_page pp pages to hold
> on to them to do their own recycling, right? We don't even have a
> get_netmem equivalent. We could add one (and for the TX path, which is
> coming along, I do add one), but even then, the pp needs to detect
> elevated references on net_iovs to exclude them from pp recycling. The
> mp also needs to understand/keep track of elevated refcounts and make
> sure the page is returned to it when the elevated refcounts from the
> driver are dropped.
No? It should all just work. The page may get split / fragmented by
the driver or page_pool_alloc_netmem() which you're adding in this
series. A fragmented net_iov will have an elevated refcount in exactly
the same way as if the driver was stashing one ref to release later.
next prev parent reply other threads:[~2024-12-12 2:28 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 17:23 [PATCH net-next v3 0/5] devmem TCP fixes Mina Almasry
2024-12-09 17:23 ` [PATCH net-next v3 1/5] net: page_pool: rename page_pool_alloc_netmem to *_netmems Mina Almasry
2024-12-09 17:23 ` [PATCH net-next v3 2/5] net: page_pool: create page_pool_alloc_netmem Mina Almasry
2024-12-09 17:23 ` [PATCH net-next v3 3/5] page_pool: Set `dma_sync` to false for devmem memory provider Mina Almasry
2024-12-11 3:44 ` Jakub Kicinski
2024-12-09 17:23 ` [PATCH net-next v3 4/5] page_pool: disable sync for cpu for dmabuf " Mina Almasry
2024-12-11 3:47 ` Jakub Kicinski
2024-12-11 19:40 ` Mina Almasry
2024-12-09 17:23 ` [PATCH net-next v3 5/5] net: Document memory provider driver support Mina Almasry
2024-12-09 17:43 ` Randy Dunlap
2024-12-11 3:55 ` Jakub Kicinski
2024-12-11 17:53 ` Mina Almasry
2024-12-12 2:28 ` Jakub Kicinski [this message]
2024-12-13 17:50 ` Mina Almasry
2024-12-14 1:55 ` Jakub Kicinski
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=20241211182813.789616ce@kernel.org \
--to=kuba@kernel.org \
--cc=almasrymina@google.com \
--cc=asml.silence@gmail.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=horms@kernel.org \
--cc=ilias.apalodimas@linaro.org \
--cc=kaiyuanz@google.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=skhawaja@google.com \
--cc=willemb@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.