isolate_freepages_range(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– isolate_freepages_range(9) β€” Kernel API Manual πŸ’–

okay bestie, welcome to the Kernel API Manual page for isolate_freepages_range(9). we’re gonna make this make sense, no cap 🫢

✨ NAME ✨

isolate_freepages_range β€” isolate free pages.

🌸 SYNOPSIS 🌸

unsigned long isolate_freepages_range (struct compact_control *cc ,
unsigned long start_pfn , unsigned long end_pfn );

πŸŽ€ ARGUMENTS πŸŽ€

  • cc β€” Compaction control structure. lowkey the main character of this whole operation πŸ’…
  • start_pfn β€” The first PFN to start isolating. that’s where the isolation era begins ✨
  • end_pfn β€” The one-past-last PFN. yes, one-past-last, iconic boundary behavior πŸŽ€

πŸ’… DESCRIPTION πŸ’…

vibe check time, bestie. Non-free pages, invalid PFNs, or zone boundaries within the [start_pfn, end_pfn) range are considered errors. Those cause the function to undo its actions and return zero. And cc->freepages[] are empty. not me getting emotional over error handling 😭

Otherwise, the function returns one-past-the-last PFN of isolated page (which may be greater then end_pfn if end fell in a middle of a free page). cc->freepages[] contain free pages isolated. periodt. ✨

🌈 SEE ALSO 🌈

Kernel file ./mm/compaction.c β€” skip_isolation_on_order(9), isolate_migratepages_block(9), isolate_migratepages_range(9), try_to_compact_pages(9). iykyk, go read those too bestie πŸ’–


and that’s the page, bestie 🫢 source/version: ./mm; date: October 2026; title: isolate_freepages_range(9). bye! πŸ’–

πŸ“¦ where this page comes from