Thread (12 messages) 12 messages, 4 authors, 2025-09-23

Re: [PATCH net-next] page_pool: add debug for release to cache from wrong CPU

From: Dragos Tatulea <dtatulea@nvidia.com>
Date: 2025-09-18 09:51:50
Also in: linux-rt-devel, lkml


On 18.09.25 12:13, Sebastian Andrzej Siewior wrote:
On 2025-09-18 11:48:21 [+0300], Dragos Tatulea wrote:
quoted
diff --git a/net/core/page_pool.c b/net/core/page_pool.c
index ba70569bd4b0..404064d893d6 100644
--- a/net/core/page_pool.c
+++ b/net/core/page_pool.c
@@ -768,6 +795,18 @@ static bool page_pool_recycle_in_cache(netmem_ref netmem,
 		return false;
 	}
 
+#ifdef CONFIG_DEBUG_PAGE_POOL_CACHE_RELEASE
+	if (unlikely(!page_pool_napi_local(pool))) {
if you do IS_ENABLED(CONFIG_DEBUG_PAGE_POOL_CACHE_RELEASE) you could
avoid the ifdef.
Ack. Makes sense. 
A quick question, where is this allow_direct argument supposed to come
from? I just noticed that mlx5 does
   page_pool_put_unrefed_netmem(, true);

which then does not consider page_pool_napi_local(). But your proposed
change here will complain as it should.
Good point and an oversight on my behalf. It will indeed complain during
rq teardown. If there is agreement on the approach proposed here then the
mlx5 driver will be changed to set the flag to false during teardown.
We used to do that but removed it for simplicity.

Thanks,
Dragos
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help