]> git.proxmox.com Git - mirror_ubuntu-impish-kernel.git/commitdiff
mm, compaction: ignore the fragmentation avoidance boost for isolation and compaction
authorMel Gorman <mgorman@techsingularity.net>
Tue, 5 Mar 2019 23:44:50 +0000 (15:44 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 6 Mar 2019 05:07:16 +0000 (21:07 -0800)
When pageblocks get fragmented, watermarks are artifically boosted to
reclaim pages to avoid further fragmentation events.  However,
compaction is often either fragmentation-neutral or moving movable pages
away from unmovable/reclaimable pages.  As the true watermarks are
preserved, allow compaction to ignore the boost factor.

The expected impact is very slight as the main benefit is that
compaction is slightly more likely to succeed when the system has been
fragmented very recently.  On both 1-socket and 2-socket machines for
THP-intensive allocation during fragmentation the success rate was
increased by less than 1% which is marginal.  However, detailed tracing
indicated that failure of migration due to a premature ENOMEM triggered
by watermark checks were eliminated.

Link: http://lkml.kernel.org/r/20190118175136.31341-9-mgorman@techsingularity.net
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: David Rientjes <rientjes@google.com>
Cc: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c

index 8afb6f007f6826c373755cb865a11e267da01ad8..2e132b9e7a9328600e03cf987a93b5bd5957851c 100644 (file)
@@ -2962,7 +2962,7 @@ int __isolate_free_page(struct page *page, unsigned int order)
                 * watermark, because we already know our high-order page
                 * exists.
                 */
-               watermark = min_wmark_pages(zone) + (1UL << order);
+               watermark = zone->_watermark[WMARK_MIN] + (1UL << order);
                if (!zone_watermark_ok(zone, 0, watermark, 0, ALLOC_CMA))
                        return 0;