]> Pileus Git - ~andy/linux/blobdiff - mm/compaction.c
mm: dump page when hitting a VM_BUG_ON using VM_BUG_ON_PAGE
[~andy/linux] / mm / compaction.c
index 32a033cb5c65602b33d5f8674ca80c62db935063..e0ab02d70f13434059d1f05442285e0773189a1c 100644 (file)
@@ -601,7 +601,7 @@ isolate_migratepages_range(struct zone *zone, struct compact_control *cc,
                if (__isolate_lru_page(page, mode) != 0)
                        continue;
 
-               VM_BUG_ON(PageTransCompound(page));
+               VM_BUG_ON_PAGE(PageTransCompound(page), page);
 
                /* Successfully isolated */
                cc->finished_update_migrate = true;
@@ -851,6 +851,10 @@ static int compact_finished(struct zone *zone,
 
        /* Compaction run completes if the migrate and free scanner meet */
        if (cc->free_pfn <= cc->migrate_pfn) {
+               /* Let the next compaction start anew. */
+               zone->compact_cached_migrate_pfn = zone->zone_start_pfn;
+               zone->compact_cached_free_pfn = zone_end_pfn(zone);
+
                /*
                 * Mark that the PG_migrate_skip information should be cleared
                 * by kswapd when it goes to sleep. kswapd does not set the