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,
  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. /*
  15. * Changes MIGRATE_ISOLATE to MIGRATE_MOVABLE.
  16. * target range is [start_pfn, end_pfn)
  17. */
  18. extern int
  19. undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn);
  20. /*
  21. * test all pages in [start_pfn, end_pfn)are isolated or not.
  22. */
  23. extern int
  24. test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn);
  25. /*
  26. * Internal funcs.Changes pageblock's migrate type.
  27. * Please use make_pagetype_isolated()/make_pagetype_movable().
  28. */
  29. extern int set_migratetype_isolate(struct page *page);
  30. extern void unset_migratetype_isolate(struct page *page);
  31. #endif