|
@@ -1131,8 +1131,8 @@ static void change_pageblock_range(struct page *pageblock_page,
|
|
|
* nor move CMA pages to different free lists. We don't want unmovable pages
|
|
* nor move CMA pages to different free lists. We don't want unmovable pages
|
|
|
* to be allocated from MIGRATE_CMA areas.
|
|
* to be allocated from MIGRATE_CMA areas.
|
|
|
*
|
|
*
|
|
|
- * Returns the new migratetype of the pageblock (or the same old migratetype
|
|
|
|
|
- * if it was unchanged).
|
|
|
|
|
|
|
+ * Returns the allocation migratetype if free pages were stolen, or the
|
|
|
|
|
+ * fallback migratetype if it was decided not to steal.
|
|
|
*/
|
|
*/
|
|
|
static int try_to_steal_freepages(struct zone *zone, struct page *page,
|
|
static int try_to_steal_freepages(struct zone *zone, struct page *page,
|
|
|
int start_type, int fallback_type)
|
|
int start_type, int fallback_type)
|
|
@@ -1163,12 +1163,10 @@ static int try_to_steal_freepages(struct zone *zone, struct page *page,
|
|
|
|
|
|
|
|
/* Claim the whole block if over half of it is free */
|
|
/* Claim the whole block if over half of it is free */
|
|
|
if (pages >= (1 << (pageblock_order-1)) ||
|
|
if (pages >= (1 << (pageblock_order-1)) ||
|
|
|
- page_group_by_mobility_disabled) {
|
|
|
|
|
-
|
|
|
|
|
|
|
+ page_group_by_mobility_disabled)
|
|
|
set_pageblock_migratetype(page, start_type);
|
|
set_pageblock_migratetype(page, start_type);
|
|
|
- return start_type;
|
|
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
|
|
+ return start_type;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return fallback_type;
|
|
return fallback_type;
|
|
@@ -1220,7 +1218,7 @@ __rmqueue_fallback(struct zone *zone, unsigned int order, int start_migratetype)
|
|
|
set_freepage_migratetype(page, new_type);
|
|
set_freepage_migratetype(page, new_type);
|
|
|
|
|
|
|
|
trace_mm_page_alloc_extfrag(page, order, current_order,
|
|
trace_mm_page_alloc_extfrag(page, order, current_order,
|
|
|
- start_migratetype, migratetype, new_type);
|
|
|
|
|
|
|
+ start_migratetype, migratetype);
|
|
|
|
|
|
|
|
return page;
|
|
return page;
|
|
|
}
|
|
}
|