folio_isolate_hugetlb(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… folio_isolate_hugetlb β€” kernel API manual, bestie edition ✨

okay so picture this: you're deep in ./mm/hugetlb.c territory, the Kernel API Manual is open, and you need to know about folio_isolate_hugetlb(9). Welcome, you're in the right group chat 🫢


🌸 NAME 🌸

folio_isolate_hugetlb β€” literally just trying to isolate an allocated hugetlb folio, no big deal πŸ’–


✨ SYNOPSIS ✨

bool folio_isolate_hugetlb (struct folio *folio , struct list_head *list
);

like yes bestie it returns a bool, we love a yes-or-no icon πŸ‘‘


πŸŽ€ ARGUMENTS πŸŽ€

  • folio β€” the folio we're trying to isolate. main character energy fr fr.
  • list β€” the list we plop that folio onto on success. bestie gets a new home πŸ’…

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the vibe: this function isolates an allocated (refcount > 0) hugetlb folio. it marks it as isolated/non-migratable and moves it from the active list over to whatever list you handed it. slay.

so when does it flop? isolation fails if folio is not an allocated hugetlb folio, or if it's already isolated/non-migratable. like, it's already booked and busy, respect that 😭

on success, an additional folio reference is taken, and you must drop it using folio_putback_hugetlb to undo the isolation. do not forget this or you will simply have a bad time 🚨

⭐ RETURN ⭐

True if isolation worked, otherwise False. that's it, that's the whole answer 🌈


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the page!! brought to you by ./mm, dated October 2026, living in the Kernel API Manual πŸ’œ go forth and isolate responsibly, bestie 🧚✨

πŸ“¦ where this page comes from