]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
mm: compaction: cache if a pageblock was scanned and no pages were isolated -fix2
authorMel Gorman <mgorman@suse.de>
Fri, 28 Sep 2012 00:19:48 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 8 Oct 2012 03:00:13 +0000 (14:00 +1100)
The clearing of PG_migrate_skip potentially takes a long time if the
zone is massive. Be safe and check if it needs to reschedule.

This is a fix for
mm-compaction-cache-if-a-pageblock-was-scanned-and-no-pages-were-isolated.patch

Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/compaction.c

index e54027411a6c60e153061bfd5932ce42c29bc39c..f7a5ff5af9f53210e4c2af9c2298340dc517202f 100644 (file)
@@ -85,6 +85,9 @@ static void reset_isolation_suitable(struct zone *zone)
        /* Walk the zone and mark every pageblock as suitable for isolation */
        for (pfn = start_pfn; pfn < end_pfn; pfn += pageblock_nr_pages) {
                struct page *page;
+
+               cond_resched();
+
                if (!pfn_valid(pfn))
                        continue;