page_pool_e...ct_recycling(9)
π page_pool_e...ct_recycling(9) β like, the whole page, bestie
okay so this is from the Kernel API Manual, and the function name got truncated in the header (it's page_pool_enable_direct_recycling, iykyk) β the real one is a little long for a header, tragic, we move.
β¨ NAME β¨
page_pool_enable_direct_recycling β marks a page pool as owned by NAPI π«Ά
πΈ SYNOPSIS πΈ
void page_pool_enable_direct_recycling (struct page_pool *pool , struct
napi_struct *napi );
π ARGUMENTS π
poolβ the page pool you're modifying, that's the one, she's the main character here πnapiβ the NAPI instance you're associating the page pool with π¦
π₯ DESCRIPTION π₯
So the vibe is: you're associating a page pool with a NAPI instance for lockless page recycling. Iconic. Basically this is useful when a new page pool has to be added to a NAPI instance without disabling that NAPI instance β you use this to mark the exact point at which the control path "hands over" the page pool to the NAPI instance. The handoff. The moment. β
In most cases a driver can simply set thenapifield instruct page_pool_params, and does not have to call this helper. fr fr, check before you commit π
Now the fine print, and bestie, listen:
- The function is idempotent β calling it again changes nothing, she's stable like that β¨
- But it does not implement any refcounting. π¨ A single
page_pool_disable_direct_recyclingwill disable recycling, no matter how many times enable was called. So don't go thinking you stacked up enable calls for safety, you didn't, that's not how this works π
π SEE ALSO π
- Kernel file
./net/core/page_pool.c page_pool_get_stats(9)page_pool_create_percpu(9)page_pool_create(9)page_pool_put_netmem_bulk(9)
and that's the whole page, no crumbs left π. this lil beauty lives in the kernel source under ./net/core, dated October 2026 β go off, October 2026, you ate ππ
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms