|
@@ -756,13 +756,6 @@ static unsigned long scan_lru_pages(unsigned long start, unsigned long end)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static struct page *
|
|
|
-hotremove_migrate_alloc(struct page *page, unsigned long private, int **x)
|
|
|
-{
|
|
|
- /* This should be improooooved!! */
|
|
|
- return alloc_page(GFP_HIGHUSER_MOVABLE);
|
|
|
-}
|
|
|
-
|
|
|
#define NR_OFFLINE_AT_ONCE_PAGES (256)
|
|
|
static int
|
|
|
do_migrate_range(unsigned long start_pfn, unsigned long end_pfn)
|
|
@@ -813,8 +806,12 @@ do_migrate_range(unsigned long start_pfn, unsigned long end_pfn)
|
|
|
putback_lru_pages(&source);
|
|
|
goto out;
|
|
|
}
|
|
|
- /* this function returns # of failed pages */
|
|
|
- ret = migrate_pages(&source, hotremove_migrate_alloc, 0,
|
|
|
+
|
|
|
+ /*
|
|
|
+ * alloc_migrate_target should be improooooved!!
|
|
|
+ * migrate_pages returns # of failed pages.
|
|
|
+ */
|
|
|
+ ret = migrate_pages(&source, alloc_migrate_target, 0,
|
|
|
true, MIGRATE_SYNC);
|
|
|
if (ret)
|
|
|
putback_lru_pages(&source);
|