|
@@ -217,21 +217,12 @@ static inline bool compact_trylock_irqsave(spinlock_t *lock,
|
|
|
/* Returns true if the page is within a block suitable for migration to */
|
|
|
static bool suitable_migration_target(struct page *page)
|
|
|
{
|
|
|
- int migratetype = get_pageblock_migratetype(page);
|
|
|
-
|
|
|
- /* Don't interfere with memory hot-remove or the min_free_kbytes blocks */
|
|
|
- if (migratetype == MIGRATE_RESERVE)
|
|
|
- return false;
|
|
|
-
|
|
|
- if (is_migrate_isolate(migratetype))
|
|
|
- return false;
|
|
|
-
|
|
|
- /* If the page is a large free page, then allow migration */
|
|
|
+ /* If the page is a large free page, then disallow migration */
|
|
|
if (PageBuddy(page) && page_order(page) >= pageblock_order)
|
|
|
- return true;
|
|
|
+ return false;
|
|
|
|
|
|
/* If the block is MIGRATE_MOVABLE or MIGRATE_CMA, allow migration */
|
|
|
- if (migrate_async_suitable(migratetype))
|
|
|
+ if (migrate_async_suitable(get_pageblock_migratetype(page)))
|
|
|
return true;
|
|
|
|
|
|
/* Otherwise skip the block */
|