[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ecb71c6f-9a9e-439f-b64c-2779ee5afdd8@gmail.com>
Date: Tue, 15 Jul 2025 10:53:24 +0100
From: Pavel Begunkov <asml.silence@...il.com>
To: Mina Almasry <almasrymina@...gle.com>, Byungchul Park <byungchul@...com>
Cc: 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, hannes@...xchg.org, ziy@...dia.com,
jackmanb@...gle.com
Subject: Re: [PATCH net-next v9 3/8] page_pool: access ->pp_magic through
struct netmem_desc in page_pool_page_is_pp()
On 7/14/25 20:09, Mina Almasry wrote:
> On Thu, Jul 10, 2025 at 6:14 PM Byungchul Park <byungchul@...com> wrote:
...>> Both the mainline code and this patch can make sense *only if* it's
>> actually a pp page. It's unevitable until mm provides a way to identify
>> the type of page for page pool. Thoughts?
>
> I don't see mainline having a problem. Mainline checks that the page
> is a pp page via the magic before using any of the pp fields. This is
> because a page* can be a pp page or a non-pp page.
>
> With netmem_desc, having a netmem_desc* should imply that the
> underlying memory is a pp page. Having a netmem_desc* that is not
> valid because the pp_magic is not correct complicates the code for no
> reason. Every user of netmem_desc has to check pp_magic before
> actually using the fields. page_to_nmdesc should just refuse to return
> a netmem_desc* if the page is not a pp page.
>
> Also, this patch has my Reviewed-by, even though I honestly don't see
> it as acceptable and I clearly have feedback (and Pavel seems too?).
I was fine with it as a transitory solution, but there is nothing
to argue about anymore since mm already got a nice way to type
check pages and we can use that.
> __please__, when you make significant changes to a patch, you have to
> reset the Reviewed-by tags.
>
--
Pavel Begunkov
Powered by blists - more mailing lists