[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251215071001.78263-3-byungchul@sk.com>
Date: Mon, 15 Dec 2025 16:10:01 +0900
From: Byungchul Park <byungchul@...com>
To: linux-mm@...ck.org,
akpm@...ux-foundation.org,
netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org,
kernel_team@...ynix.com,
harry.yoo@...cle.com,
ast@...nel.org,
daniel@...earbox.net,
davem@...emloft.net,
kuba@...nel.org,
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,
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: [PATCH 2/2] mm, netmem: remove the page pool members in struct page
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, since both struct netmem_desc and struct page still share the
same space, the important offsets should be checked properly, until
struct netmem_desc has its own instance from slab.
Remove the page pool members in struct page and adjust static checkers
for the offsets.
Signed-off-by: Byungchul Park <byungchul@...com>
---
include/linux/mm_types.h | 11 -----------
include/net/netmem.h | 7 ++-----
2 files changed, 2 insertions(+), 16 deletions(-)
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 9f6de068295d3..46d3c4b52cc10 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -114,17 +114,6 @@ struct page {
*/
unsigned long private;
};
- struct { /* page_pool used by netstack */
- /**
- * @pp_magic: magic value to avoid recycling non
- * page_pool allocated pages.
- */
- unsigned long pp_magic;
- struct page_pool *pp;
- unsigned long _pp_mapping_pad;
- unsigned long dma_addr;
- atomic_long_t pp_ref_count;
- };
struct { /* Tail pages of compound page */
unsigned long compound_head; /* Bit zero is set */
};
diff --git a/include/net/netmem.h b/include/net/netmem.h
index 2a73b68f16b15..01d689de11511 100644
--- a/include/net/netmem.h
+++ b/include/net/netmem.h
@@ -42,11 +42,8 @@ struct netmem_desc {
static_assert(offsetof(struct page, pg) == \
offsetof(struct netmem_desc, desc))
NETMEM_DESC_ASSERT_OFFSET(flags, _flags);
-NETMEM_DESC_ASSERT_OFFSET(pp_magic, pp_magic);
-NETMEM_DESC_ASSERT_OFFSET(pp, pp);
-NETMEM_DESC_ASSERT_OFFSET(_pp_mapping_pad, _pp_mapping_pad);
-NETMEM_DESC_ASSERT_OFFSET(dma_addr, dma_addr);
-NETMEM_DESC_ASSERT_OFFSET(pp_ref_count, pp_ref_count);
+NETMEM_DESC_ASSERT_OFFSET(lru, pp_magic);
+NETMEM_DESC_ASSERT_OFFSET(mapping, _pp_mapping_pad);
#undef NETMEM_DESC_ASSERT_OFFSET
/*
--
2.17.1
Powered by blists - more mailing lists