test_pages_isolated(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 NAME 🌸

okay bestie, welcome β€” this is test_pages_isolated(9) from the Kernel API Manual, and it's literally the vibe check for pageblocks. πŸ’…

test_pages_isolated β€” check if pageblocks in range are isolated. periodt.


✨ SYNOPSIS ✨

int test_pages_isolated (unsigned long start_pfn , unsigned long end_pfn
, enum pb_isolate_mode mode );

πŸŽ€ ARGUMENTS πŸŽ€

  • start_pfn β€” the first PFN of the isolated range. starting point supremacy ✨
  • end_pfn β€” the first PFN after the isolated range. not the last one inside it, bestie β€” after it. 🫢
  • mode β€” testing mode. that's the whole label, and yes it's giving mysterious-but-important. πŸŽ€

πŸ’– DESCRIPTION πŸ’–

so this one tests whether everything in the specified range is free. no cap. ✨

if PB_ISOLATE_MODE_MEM_OFFLINE is specified in mode, it will consider poisoned and offlined pages free as well. 🧚 iconic little exception, honestly.

⚠️ caller responsibility alert: the caller must ensure the requested range doesn't span zones. fr fr, do not skip that part. 😭

returns 0 if true, and -EBUSY if one or more pages are in use. πŸ’€ the busy signal said what it said.


πŸ¦‹ SEE ALSO πŸ¦‹

kernel file ./mm/page_isolation.c plus the sibling functions: isolate_single_pageblock(9), start_isolate_page_range(9), and undo_isolate_page_range(9). iykyk 🌈


mwah πŸ’‹ β€” this page is from source/version ./mm, dated October 2026, and yes it's still wearing its test_pages_isolated(9) name tag. πŸŽ€

πŸ“¦ where this page comes from