page_pool_e...ct_recycling(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 the napi field in struct 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_recycling will 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 🌈


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