page-isolation.h 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef __LINUX_PAGEISOLATION_H
  2. #define __LINUX_PAGEISOLATION_H
  3. /*
  4. * Changes migrate type in [start_pfn, end_pfn) to be MIGRATE_ISOLATE.
  5. * If specified range includes migrate types other than MOVABLE or CMA,
  6. * this will fail with -EBUSY.
  7. *
  8. * For isolating all pages in the range finally, the caller have to
  9. * free all pages in the range. test_page_isolated() can be used for
  10. * test it.
  11. */
  12. extern int
  13. start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
  14. unsigned migratetype);
  15. /*
  16. * Changes MIGRATE_ISOLATE to MIGRATE_MOVABLE.
  17. * target range is [start_pfn, end_pfn)
  18. */
  19. extern int
  20. undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
  21. unsigned migratetype);
  22. /*
  23. * Test all pages in [start_pfn, end_pfn) are isolated or not.
  24. */
  25. int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn);
  26. /*
  27. * Internal functions. Changes pageblock's migrate type.
  28. */
  29. extern int set_migratetype_isolate(struct page *page);
  30. extern void unset_migratetype_isolate(struct page *page, unsigned migratetype);
  31. #endif