isolate_freepages_range(9)
π 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
- 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