release_pages(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ release_pages(9) ✨

okay so bestie, this is a page from the Kernel API Manual β€” section 9, release_pages(9) β€” and honestly it's giving "group project cleanup crew" energy πŸ’…


🌸 NAME 🌸

release_pages β€” batched put_page() πŸŽ€

like, put_page() but make it a batch, yk? one call, many pages, no chaos ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

void release_pages (release_pages_arg arg , int nr );

literally the whole signature, no cap πŸ”₯


πŸ’– ARGUMENTS πŸ’–

  • arg β€” array of pages to release 🫢 like the whole squad of pages you're letting go of
  • nr β€” number of pages 🌈 how many of them we're talking about here

πŸ‘‘ DESCRIPTION πŸ‘‘

okay so here's the tea β˜•: this function decrements the reference count on all the pages in arg.

If it fell to zero? bestie, the page is done β€” it gets removed from the LRU and freed. poof. gone. iconic exit πŸ’€βœ¨

Note that the argument can be an array of pages, encoded pages, or folio pointers. We ignore any encoded bits, and turn any of them into just a folio that gets free'd.

so yeah, whatever flavor of pointer you hand over β€” plain pages, encoded pages, folios β€” the encoded bits get yeeted πŸ™ˆ and everything becomes just a folio that gets free'd. no extra steps, no drama πŸ’œ


🌟 SEE ALSO 🌟

Kernel file ./mm/folio.c β€” and the whole friend group πŸ‘‡


mwah πŸ’‹ that's the whole page β€” from ./mm, dated October 2026. go free some folios bestie, you got this πŸ§šπŸ’–

πŸ“¦ where this page comes from