hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/include/linux/page-isolation.h
....@@ -30,30 +30,28 @@
3030 }
3131 #endif
3232
33
-bool has_unmovable_pages(struct zone *zone, struct page *page, int count,
34
- int migratetype, bool skip_hwpoisoned_pages);
33
+#define MEMORY_OFFLINE 0x1
34
+#define REPORT_FAILURE 0x2
35
+
36
+struct page *has_unmovable_pages(struct zone *zone, struct page *page,
37
+ int migratetype, int flags);
3538 void set_pageblock_migratetype(struct page *page, int migratetype);
3639 int move_freepages_block(struct zone *zone, struct page *page,
3740 int migratetype, int *num_movable);
3841
3942 /*
4043 * Changes migrate type in [start_pfn, end_pfn) to be MIGRATE_ISOLATE.
41
- * If specified range includes migrate types other than MOVABLE or CMA,
42
- * this will fail with -EBUSY.
43
- *
44
- * For isolating all pages in the range finally, the caller have to
45
- * free all pages in the range. test_page_isolated() can be used for
46
- * test it.
4744 */
4845 int
4946 start_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
50
- unsigned migratetype, bool skip_hwpoisoned_pages);
47
+ unsigned migratetype, int flags,
48
+ unsigned long *failed_pfn);
5149
5250 /*
5351 * Changes MIGRATE_ISOLATE to MIGRATE_MOVABLE.
5452 * target range is [start_pfn, end_pfn)
5553 */
56
-int
54
+void
5755 undo_isolate_page_range(unsigned long start_pfn, unsigned long end_pfn,
5856 unsigned migratetype);
5957
....@@ -61,7 +59,7 @@
6159 * Test all pages in [start_pfn, end_pfn) are isolated or not.
6260 */
6361 int test_pages_isolated(unsigned long start_pfn, unsigned long end_pfn,
64
- bool skip_hwpoisoned_pages);
62
+ int isol_flags, unsigned long *failed_pfn);
6563
6664 struct page *alloc_migrate_target(struct page *page, unsigned long private);
6765