[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250512125810.GE45370@system.software.com>
Date: Mon, 12 May 2025 21:58:10 +0900
From: Byungchul Park <byungchul@...com>
To: Ilias Apalodimas <ilias.apalodimas@...aro.org>
Cc: willy@...radead.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
kernel_team@...ynix.com, kuba@...nel.org, almasrymina@...gle.com,
harry.yoo@...cle.com, hawk@...nel.org, akpm@...ux-foundation.org,
ast@...nel.org, daniel@...earbox.net, davem@...emloft.net,
john.fastabend@...il.com, andrew+netdev@...n.ch,
edumazet@...gle.com, pabeni@...hat.com, vishal.moola@...il.com
Subject: Re: [RFC 19/19] mm, netmem: remove the page pool members in struct
page
On Sat, May 10, 2025 at 10:26:00AM +0300, Ilias Apalodimas wrote:
> Hi Byungchul
>
> On Fri, 9 May 2025 at 14:51, Byungchul Park <byungchul@...com> wrote:
> >
> > Now that all the users of the page pool members in struct page have been
> > gone, the members can be removed from struct page. However, the space
> > in struct page needs to be kept using a place holder with the same size,
> > until struct netmem_desc has its own instance, not overlayed onto struct
> > page, to avoid conficting with other members within struct page.
> >
>
> FWIW similar mirroring was intially proposed [0] a few years ago
>
> > Remove the page pool members in struct page and replace with a place
> > holder. The place holder should be removed once struct netmem_desc has
> > its own instance.
>
> instance? To make sure I understand this, the netmem_descs are
> expected to be allocated in the future right?
Yes.
> [...]
>
> > -
> > static inline struct net_iov_area *net_iov_owner(const struct netmem_desc *niov)
> > {
> > return niov->owner;
> > diff --git a/include/net/netmem_type.h b/include/net/netmem_type.h
> > new file mode 100644
> > index 0000000000000..6a3ac8e908515
> > --- /dev/null
> > +++ b/include/net/netmem_type.h
> > @@ -0,0 +1,22 @@
> > +/* SPDX-License-Identifier: GPL-2.0
> > + *
> > + * Author: Byungchul Park <max.byungchul.park@...il.com>
>
> Shouldn't Minas authorship be preserved here?
Ah. I dunno what I'm supposed to do in the case. I will remove the
author part :) if it's still okay.
Byungchul
> > + */
> > +
> > +#ifndef _NET_NETMEM_TYPE_H
> > +#define _NET_NETMEM_TYPE_H
> > +
> > +#include <linux/stddef.h>
> > +
> > +struct netmem_desc {
> > + unsigned long __unused_padding;
> > + struct_group_tagged(__netmem_desc, actual_data,
> > + unsigned long pp_magic;
> > + struct page_pool *pp;
> > + struct net_iov_area *owner;
> > + unsigned long dma_addr;
> > + atomic_long_t pp_ref_count;
> > + );
> > +};
> > +
> > +#endif /* _NET_NETMEM_TYPE_H */
> > --
> > 2.17.1
> >
>
> [0] https://lore.kernel.org/netdev/1549550196-25581-1-git-send-email-ilias.apalodimas@linaro.org/
> Thanks
> /Ilias
Powered by blists - more mailing lists