[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAC_iWj+vweve6V33cqHGZ6tSehs85vXd7VKAGNiEjLoK2pc+PQ@mail.gmail.com>
Date: Sat, 10 May 2025 10:26:00 +0300
From: Ilias Apalodimas <ilias.apalodimas@...aro.org>
To: 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,
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
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?
[...]
> -
> 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?
> + */
> +
> +#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