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: Jakub Kicinski <kuba@kernel.org>
Date: 2025-09-19 23:57:47
Also in: linux-rt-devel, lkml

On Thu, 18 Sep 2025 11:48:21 +0300 Dragos Tatulea wrote:
Direct page releases to cache must be done on the same CPU as where NAPI
is running.
You talk about NAPI..
quoted hunk ↗ jump to hunk
 /* Only allow direct recycling in special circumstances, into the
  * alloc side cache.  E.g. during RX-NAPI processing for XDP_DROP use-case.
  *
@@ -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))) {
+		u32 pp_cpuid = READ_ONCE(pool->cpuid);
but then you print pp->cpuid?

The patch seems half-baked. If the NAPI local recycling is incorrect
the pp will leak a reference and live forever. Which hopefully people
would notice. Are you adding this check just to double confirm that
any leaks you're chasing are in the driver, and not in the core?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help