unsigned long low_pfn, end_pfn;
unsigned long last_pageblock_nr = 0, pageblock_nr;
unsigned long nr_scanned = 0, nr_isolated = 0;
+ isolate_migrate_t ret = ISOLATE_NONE;
struct list_head *migratelist = &cc->migratepages;
isolate_mode_t mode = ISOLATE_ACTIVE | ISOLATE_INACTIVE |
ISOLATE_UNEVICTABLE;
/* Do not cross the free scanner or scan within a memory hole */
if (end_pfn > cc->free_pfn || !pfn_valid(low_pfn)) {
cc->migrate_pfn = end_pfn;
- return ISOLATE_NONE;
+ return ret;
}
/*
break;
}
- acct_isolated(zone, cc);
+ if (cc->nr_migratepages > 0) {
+ acct_isolated(zone, cc);
+ ret = ISOLATE_SUCCESS;
+ }
spin_unlock_irq(&zone->lru_lock);
cc->migrate_pfn = low_pfn;
trace_mm_compaction_isolate_migratepages(nr_scanned, nr_isolated);
- return ISOLATE_SUCCESS;
+ return ret;
}
/*