mm, page_isolation: drain single zone pcplists
authorVlastimil Babka <[email protected]>
Wed, 10 Dec 2014 23:43:04 +0000 (15:43 -0800)
committerLinus Torvalds <[email protected]>
Thu, 11 Dec 2014 01:41:05 +0000 (17:41 -0800)
When setting MIGRATETYPE_ISOLATE on a pageblock, pcplists are drained to
have a better chance that all pages will be successfully isolated and
not left in the per-cpu caches.  Since isolation is always concerned
with a single zone, we can reduce the pcplists drain to the single zone,
which is now possible.

The change should make memory isolation faster and not disturbing
unrelated pcplists anymore.

Signed-off-by: Vlastimil Babka <[email protected]>
Cc: Naoya Horiguchi <[email protected]>
Cc: Mel Gorman <[email protected]>
Cc: Rik van Riel <[email protected]>
Cc: Yasuaki Ishimatsu <[email protected]>
Cc: Zhang Yanfei <[email protected]>
Cc: Xishi Qiu <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Michal Nazarewicz <[email protected]>
Cc: Marek Szyprowski <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
mm/page_isolation.c

index f2452e5116b23c4374c9dd1c9dfa70de50644626..72f5ac381ab3253b6016583e0618be6f3e91367c 100644 (file)
@@ -68,7 +68,7 @@ out:
 
        spin_unlock_irqrestore(&zone->lock, flags);
        if (!ret)
-               drain_all_pages(NULL);
+               drain_all_pages(zone);
        return ret;
 }