[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251117042558.GA18510@system.software.com>
Date: Mon, 17 Nov 2025 13:25:58 +0900
From: Byungchul Park <byungchul@...com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: linux-mm@...ck.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel_team@...ynix.com,
harry.yoo@...cle.com, ast@...nel.org, daniel@...earbox.net,
davem@...emloft.net, hawk@...nel.org, john.fastabend@...il.com,
sdf@...ichev.me, saeedm@...dia.com, leon@...nel.org,
tariqt@...dia.com, mbloch@...dia.com, andrew+netdev@...n.ch,
edumazet@...gle.com, pabeni@...hat.com, akpm@...ux-foundation.org,
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,
jackmanb@...gle.com, hannes@...xchg.org, ziy@...dia.com,
ilias.apalodimas@...aro.org, willy@...radead.org,
brauner@...nel.org, kas@...nel.org, yuzhao@...gle.com,
usamaarif642@...il.com, baolin.wang@...ux.alibaba.com,
almasrymina@...gle.com, toke@...hat.com, asml.silence@...il.com,
bpf@...r.kernel.org, linux-rdma@...r.kernel.org,
sfr@...b.auug.org.au, dw@...idwei.uk, ap420073@...il.com,
dtatulea@...dia.com
Subject: Re: [RFC mm v5 1/2] page_pool: check nmdesc->pp to see its usage as
page pool for net_iov not page-backed
On Fri, Nov 14, 2025 at 05:23:18PM -0800, Jakub Kicinski wrote:
> On Wed, 12 Nov 2025 16:41:18 +0900 Byungchul Park wrote:
> > diff --git a/include/net/netmem.h b/include/net/netmem.h
> > index 651e2c62d1dd..b42d75ecd411 100644
> > --- a/include/net/netmem.h
> > +++ b/include/net/netmem.h
> > @@ -114,10 +114,21 @@ struct net_iov {
> > atomic_long_t pp_ref_count;
> > };
> > };
> > +
> > + unsigned int page_type;
> > struct net_iov_area *owner;
> > enum net_iov_type type;
>
> type is 4B already in net-next, so you may want to reorder @type
> with @owner to avoid a hole and increasing the struct size.
Sure. Better reorder them. I will. Thanks.
Byungchul
> Other than that LGTM!
>
> struct net_iov {
> union {
> struct netmem_desc desc; /* 0 48 */
> struct {
> long unsigned int _flags; /* 0 8 */
> long unsigned int pp_magic; /* 8 8 */
> struct page_pool * pp; /* 16 8 */
> long unsigned int _pp_mapping_pad; /* 24 8 */
> long unsigned int dma_addr; /* 32 8 */
> atomic_long_t pp_ref_count; /* 40 8 */
> }; /* 0 48 */
> }; /* 0 48 */
> struct net_iov_area * owner; /* 48 8 */
> enum net_iov_type type; /* 56 4 */
>
> /* size: 64, cachelines: 1, members: 3 */
> /* padding: 4 */
> };
Powered by blists - more mailing lists