unpin_folio(9)
π unpin_folio β kernel API manual, bestie edition π
okay so this is unpin_folio(9) from the Kernel API Manual, and it is genuinely one of the shortest little pages ever, so let's get into it π«Ά
β¨ NAME β¨
unpin_folio β release a dma-pinned folio. that's it. that's the whole job. unpin_folio releases a folio that got dma-pinned. iconic, minimal, does exactly what it says π
πΈ SYNOPSIS πΈ
void unpin_folio (struct folio *folio );
no return value, no drama, just void and vibes β¨
π ARGUMENTS π
folioβ pointer to the folio that's getting released. yep, that's the whole argument list. one (1) folio, handed over so it can be set free π¦
π DESCRIPTION π
so here's the lore: folios that were pinned via memfd_pin_folios or other similar routines must be released β and you've got two ways to do it, either with unpin_folio or with unpin_folios. that's the rule, no cap. pinned means somebody's gotta unpin it eventually, and this is one of your two doors out πͺβ¨
lowkey important: the original says must be released, so likeβ¦ don't just leave your pinned folios hanging, bestie π
π SEE ALSO π
it's giving "let me introduce you to the whole friend group" β the Kernel file ./mm/gup.c crew, all of them, in order:
try_grab_folio(9)unpin_user_page(9)folio_add_pin(9)unpin_user_pages_dirty_lock(9)unpin_user_page_range_dirty_lock(9)unpin_user_pages(9)unpin_user_folio(9)unpin_folios(9)try_grab_folio_fast(9)follow_page_mask(9)__get_user_pages(9)fixup_user_fault(9)populate_vma_page_range(9)fault_in_writeable(9)fault_in_subpage_writeable(9)fault_in_readable(9)get_dump_page(9)get_user_pages_remote(9)get_user_pages(9)get_user_pages_fast_only(9)get_user_pages_fast(9)pin_user_pages_fast(9)pin_user_pages_remote(9)pin_user_pages(9)memfd_pin_folios(9)folio_add_pins(9)
like, the entire ./mm friend group showed up to the group chat π₯ go read them all, iykyk π
and that's the page, babe β brought to you from ./mm, dated October 2026, and filed under unpin_folio(9) in the Kernel API Manual. mwah πβ¨
π¦ 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