linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/18] Split netmem from struct page
@ 2025-05-23  3:25 Byungchul Park
  2025-05-23  3:25 ` [PATCH 01/18] netmem: introduce struct netmem_desc struct_group_tagged()'ed on struct net_iov Byungchul Park
                   ` (19 more replies)
  0 siblings, 20 replies; 72+ messages in thread
From: Byungchul Park @ 2025-05-23  3:25 UTC (permalink / raw)
  To: willy, netdev
  Cc: linux-kernel, linux-mm, kernel_team, kuba, almasrymina,
	ilias.apalodimas, harry.yoo, hawk, akpm, davem, john.fastabend,
	andrew+netdev, asml.silence, toke, tariqt, edumazet, pabeni,
	saeedm, leon, ast, daniel, david, lorenzo.stoakes, Liam.Howlett,
	vbabka, rppt, surenb, mhocko, horms, linux-rdma, bpf,
	vishal.moola

The MM subsystem is trying to reduce struct page to a single pointer.
The first step towards that is splitting struct page by its individual
users, as has already been done with folio and slab.  This patchset does
that for netmem which is used for page pools.

Matthew Wilcox tried and stopped the same work, you can see in:

   https://lore.kernel.org/linux-mm/20230111042214.907030-1-willy@infradead.org/

Mina Almasry already has done a lot fo prerequisite works by luck, he
said :).  I stacked my patches on the top of his work e.i. netmem.

I focused on removing the page pool members in struct page this time,
not moving the allocation code of page pool from net to mm.  It can be
done later if needed.

My rfc version of this work is:

   https://lore.kernel.org/all/20250509115126.63190-1-byungchul@sk.com/

There are still a lot of works to do, to remove the dependency on struct
page in the network subsystem.  I will continue to work on this after
this base patchset is merged.

---

Changes from rfc:
	1. Rebase on net-next's main branch
	   https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/
	2. Fix a build error reported by kernel test robot
	   https://lore.kernel.org/all/202505100932.uzAMBW1y-lkp@intel.com/
	3. Add given 'Reviewed-by's, thanks to Mina and Ilias
	4. Do static_assert() on the size of struct netmem_desc instead
	   of placing place-holder in struct page, feedbacked by Matthew
	5. Do struct_group_tagged(netmem_desc) on struct net_iov instead
	   of wholly renaming it to strcut netmem_desc, feedbacked by
	   Mina and Pavel

Byungchul Park (18):
  netmem: introduce struct netmem_desc struct_group_tagged()'ed on
    struct net_iov
  netmem: introduce netmem alloc APIs to wrap page alloc APIs
  page_pool: use netmem alloc/put APIs in __page_pool_alloc_page_order()
  page_pool: rename __page_pool_alloc_page_order() to
    __page_pool_alloc_large_netmem()
  page_pool: use netmem alloc/put APIs in __page_pool_alloc_pages_slow()
  page_pool: rename page_pool_return_page() to page_pool_return_netmem()
  page_pool: use netmem put API in page_pool_return_netmem()
  page_pool: rename __page_pool_release_page_dma() to
    __page_pool_release_netmem_dma()
  page_pool: rename __page_pool_put_page() to __page_pool_put_netmem()
  page_pool: rename __page_pool_alloc_pages_slow() to
    __page_pool_alloc_netmems_slow()
  mlx4: use netmem descriptor and APIs for page pool
  page_pool: use netmem APIs to access page->pp_magic in
    page_pool_page_is_pp()
  mlx5: use netmem descriptor and APIs for page pool
  netmem: use _Generic to cover const casting for page_to_netmem()
  netmem: remove __netmem_get_pp()
  page_pool: make page_pool_get_dma_addr() just wrap
    page_pool_get_dma_addr_netmem()
  netdevsim: use netmem descriptor and APIs for page pool
  mm, netmem: remove the page pool members in struct page

 drivers/net/ethernet/mellanox/mlx4/en_rx.c    |  46 ++++----
 drivers/net/ethernet/mellanox/mlx4/en_tx.c    |   8 +-
 drivers/net/ethernet/mellanox/mlx4/mlx4_en.h  |   4 +-
 drivers/net/ethernet/mellanox/mlx5/core/en.h  |   4 +-
 .../net/ethernet/mellanox/mlx5/core/en/xdp.c  |  18 ++--
 .../net/ethernet/mellanox/mlx5/core/en/xdp.h  |   2 +-
 .../net/ethernet/mellanox/mlx5/core/en_main.c |  15 ++-
 .../net/ethernet/mellanox/mlx5/core/en_rx.c   |  66 ++++++------
 drivers/net/netdevsim/netdev.c                |  18 ++--
 drivers/net/netdevsim/netdevsim.h             |   2 +-
 include/linux/mm.h                            |   5 +-
 include/linux/mm_types.h                      |  11 --
 include/linux/skbuff.h                        |  14 +++
 include/net/netmem.h                          | 101 ++++++++++--------
 include/net/page_pool/helpers.h               |  11 +-
 net/core/page_pool.c                          |  97 +++++++++--------
 16 files changed, 221 insertions(+), 201 deletions(-)


base-commit: f44092606a3f153bb7e6b277006b1f4a5b914cfc
-- 
2.17.1



^ permalink raw reply	[flat|nested] 72+ messages in thread

end of thread, other threads:[~2025-05-28 10:53 UTC | newest]

Thread overview: 72+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23  3:25 [PATCH 00/18] Split netmem from struct page Byungchul Park
2025-05-23  3:25 ` [PATCH 01/18] netmem: introduce struct netmem_desc struct_group_tagged()'ed on struct net_iov Byungchul Park
2025-05-23  9:01   ` Toke Høiland-Jørgensen
2025-05-26  0:56     ` Byungchul Park
2025-05-23 17:00   ` Mina Almasry
2025-05-26  1:15     ` Byungchul Park
2025-05-27  2:50   ` Byungchul Park
2025-05-27 20:03     ` Mina Almasry
2025-05-28  1:21       ` Byungchul Park
2025-05-28  3:47         ` Mina Almasry
2025-05-28  5:03           ` Byungchul Park
2025-05-28  7:43             ` Pavel Begunkov
2025-05-28  8:17               ` Byungchul Park
2025-05-28  7:38         ` Pavel Begunkov
2025-05-23  3:25 ` [PATCH 02/18] netmem: introduce netmem alloc APIs to wrap page alloc APIs Byungchul Park
2025-05-23  3:25 ` [PATCH 03/18] page_pool: use netmem alloc/put APIs in __page_pool_alloc_page_order() Byungchul Park
2025-05-23  3:25 ` [PATCH 04/18] page_pool: rename __page_pool_alloc_page_order() to __page_pool_alloc_large_netmem() Byungchul Park
2025-05-23  3:25 ` [PATCH 05/18] page_pool: use netmem alloc/put APIs in __page_pool_alloc_pages_slow() Byungchul Park
2025-05-23  3:25 ` [PATCH 06/18] page_pool: rename page_pool_return_page() to page_pool_return_netmem() Byungchul Park
2025-05-28  3:18   ` Mina Almasry
2025-05-23  3:25 ` [PATCH 07/18] page_pool: use netmem put API in page_pool_return_netmem() Byungchul Park
2025-05-23  3:25 ` [PATCH 08/18] page_pool: rename __page_pool_release_page_dma() to __page_pool_release_netmem_dma() Byungchul Park
2025-05-23  3:26 ` [PATCH 09/18] page_pool: rename __page_pool_put_page() to __page_pool_put_netmem() Byungchul Park
2025-05-23  3:26 ` [PATCH 10/18] page_pool: rename __page_pool_alloc_pages_slow() to __page_pool_alloc_netmems_slow() Byungchul Park
2025-05-23  3:26 ` [PATCH 11/18] mlx4: use netmem descriptor and APIs for page pool Byungchul Park
2025-05-23  3:26 ` [PATCH 12/18] page_pool: use netmem APIs to access page->pp_magic in page_pool_page_is_pp() Byungchul Park
2025-05-23  8:58   ` Toke Høiland-Jørgensen
2025-05-23 17:21   ` Mina Almasry
2025-05-26  2:23     ` Byungchul Park
2025-05-26  2:36       ` Byungchul Park
2025-05-26  8:40         ` Toke Høiland-Jørgensen
2025-05-26  9:43           ` Byungchul Park
2025-05-26  9:54             ` Toke Høiland-Jørgensen
2025-05-26 10:01               ` Byungchul Park
2025-05-28  5:14               ` Byungchul Park
2025-05-28  7:35                 ` Toke Høiland-Jørgensen
2025-05-28  8:15                   ` Byungchul Park
2025-05-28  7:51       ` Pavel Begunkov
2025-05-28  8:14         ` Byungchul Park
2025-05-28  9:07           ` Pavel Begunkov
2025-05-28  9:14             ` Byungchul Park
2025-05-28  9:20               ` Pavel Begunkov
2025-05-28  9:33                 ` Byungchul Park
2025-05-28  9:51                   ` Pavel Begunkov
2025-05-28 10:44                     ` Byungchul Park
2025-05-28 10:54                       ` Pavel Begunkov
2025-05-23  3:26 ` [PATCH 13/18] mlx5: use netmem descriptor and APIs for page pool Byungchul Park
2025-05-23 17:13   ` Mina Almasry
2025-05-26  3:08     ` Byungchul Park
2025-05-26  8:12       ` Byungchul Park
2025-05-26 18:00         ` Mina Almasry
2025-05-23  3:26 ` [PATCH 14/18] netmem: use _Generic to cover const casting for page_to_netmem() Byungchul Park
2025-05-23 17:14   ` Mina Almasry
2025-05-23  3:26 ` [PATCH 15/18] netmem: remove __netmem_get_pp() Byungchul Park
2025-05-23  3:26 ` [PATCH 16/18] page_pool: make page_pool_get_dma_addr() just wrap page_pool_get_dma_addr_netmem() Byungchul Park
2025-05-23  3:26 ` [PATCH 17/18] netdevsim: use netmem descriptor and APIs for page pool Byungchul Park
2025-05-23  3:26 ` [PATCH 18/18] mm, netmem: remove the page pool members in struct page Byungchul Park
2025-05-23 17:16   ` kernel test robot
2025-05-23 17:55   ` Mina Almasry
2025-05-26  1:37     ` Byungchul Park
2025-05-26 16:58       ` Pavel Begunkov
2025-05-26 17:33         ` Mina Almasry
2025-05-27  1:02         ` Byungchul Park
2025-05-27  1:31           ` Byungchul Park
2025-05-27  5:30           ` Pavel Begunkov
2025-05-27 17:38             ` Mina Almasry
2025-05-28  1:31               ` Byungchul Park
2025-05-28  7:21               ` Pavel Begunkov
2025-05-23  6:20 ` [PATCH 00/18] Split netmem from " Taehee Yoo
2025-05-23  7:47   ` Byungchul Park
2025-05-23 17:47 ` SeongJae Park
2025-05-26  1:16   ` Byungchul Park

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).