@@ -979,19 +979,23 @@ isolate_migratepages_block(struct compact_control *cc, unsigned long low_pfn,
* Skip any other type of page
*/
if (!PageLRU(page)) {
+ struct page *head = compound_head(page);
/*
* __PageMovable can return false positive so we need
* to verify it under page_lock.
*/
- if (unlikely(__PageMovable(page)) &&
- !PageIsolated(page)) {
+ if (unlikely(__PageMovable(head)) &&
+ !PageIsolated(head)) {
if (locked) {
unlock_page_lruvec_irqrestore(locked, flags);
locked = NULL;
}
- if (!isolate_movable_page(page, isolate_mode))
+ if (!isolate_movable_page(head, isolate_mode)) {
+ low_pfn += (1 << compound_order(head)) - 1 - (page - head);
+ page = head;
goto isolate_success;
+ }
}
goto isolate_fail;