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