[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250528013145.GB2986@system.software.com>
Date: Wed, 28 May 2025 10:31:45 +0900
From: Byungchul Park <byungchul@...com>
To: Mina Almasry <almasrymina@...gle.com>
Cc: Pavel Begunkov <asml.silence@...il.com>, willy@...radead.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org, kernel_team@...ynix.com, kuba@...nel.org,
ilias.apalodimas@...aro.org, harry.yoo@...cle.com, hawk@...nel.org,
akpm@...ux-foundation.org, davem@...emloft.net,
john.fastabend@...il.com, andrew+netdev@...n.ch, toke@...hat.com,
tariqt@...dia.com, edumazet@...gle.com, pabeni@...hat.com,
saeedm@...dia.com, leon@...nel.org, ast@...nel.org,
daniel@...earbox.net, david@...hat.com, lorenzo.stoakes@...cle.com,
Liam.Howlett@...cle.com, vbabka@...e.cz, rppt@...nel.org,
surenb@...gle.com, mhocko@...e.com, horms@...nel.org,
linux-rdma@...r.kernel.org, bpf@...r.kernel.org,
vishal.moola@...il.com
Subject: Re: [PATCH 18/18] mm, netmem: remove the page pool members in struct
page
On Tue, May 27, 2025 at 10:38:43AM -0700, Mina Almasry wrote:
> On Mon, May 26, 2025 at 10:29 PM Pavel Begunkov <asml.silence@...il.com> wrote:
> >
> > On 5/27/25 02:02, Byungchul Park wrote:
> > ...>> Patch 1:
> > >>
> > >> struct page {
> > >> unsigned long flags;
> > >> union {
> > >> struct_group_tagged(netmem_desc, netmem_desc) {
> > >> // same layout as before
> > >> ...
> > >> struct page_pool *pp;
> > >> ...
> > >> };
> > >
> > > This part will be gone shortly. The matters come from absence of this
> > > part.
> >
> > Right, the problem is not having an explicit netmem_desc in struct
> > page and not using struct netmem_desc in all relevant helpers.
> >
> > >> struct net_iov {
> > >> unsigned long flags_padding;
> > >> union {
> > >> struct {
> > >> // same layout as in page + build asserts;
> > >> ...
> > >> struct page_pool *pp;
> > >> ...
> > >> };
> > >> struct netmem_desc desc;
> > >> };
> > >> };
> > >>
> > >> struct netmem_desc *page_to_netmem_desc(struct page *page)
> > >> {
> > >> return &page->netmem_desc;
> > >
> > > page will not have any netmem things in it after this, that matters.
> >
> > Ok, the question is where are you going to stash the fields?
> > We still need space to store them. Are you going to do the
> > indirection mm folks want?
> >
>
> I think I see some confusion here. I'm not sure indirection is what mm
> folks want. The memdesc effort has already been implemented for zpdesc
> and ptdesc[1], and the approach they did is very different from this
> series. zpdesc and ptdesc have created a struct that mirrors the
It's struct netmem_desc. Just introducing struct netmem_desc that looks
exact same as struct net_iov, is ugly.
> entirety of struct page, not a subfield of struct page with
> indirection:
I think you got confused.
At the beginning, I tried to place a place-holder:
https://lore.kernel.org/all/20250512125103.GC45370@system.software.com/
But changed the direction as Matthew requested:
https://lore.kernel.org/all/aCK6J2YtA7vi1Kjz@casper.infradead.org/
So now, I will go with the same direction as the others. I will share
the updates version with the assert issues fixed.
Byungchul
>
> https://elixir.bootlin.com/linux/v6.14.3/source/mm/zpdesc.h#L29
>
> I'm now a bit confused, because the code changes in this series do not
> match the general approach that zpdesc and ptdesc have done.
> Byungchul, is the deviation in approach from zpdesc and ptdecs
> intentional? And if so why? Should we follow the zpdesc and ptdesc
> lead and implement a new struct that mirrors the entirety of struct
> page?
>
> [1] https://kernelnewbies.org/MatthewWilcox/Memdescs/Path
>
> --
> Thanks,
> Mina
Powered by blists - more mailing lists