Re: [PATCH 07/11] mm: page allocator: Do not call direct reclaimfor THP allocations while compaction is deferred

From: Rik van Riel
Date: Thu Dec 15 2011 - 23:10:51 EST


On 12/14/2011 10:41 AM, Mel Gorman wrote:
If compaction is deferred, direct reclaim is used to try free enough
pages for the allocation to succeed. For small high-orders, this has
a reasonable chance of success. However, if the caller has specified
__GFP_NO_KSWAPD to limit the disruption to the system, it makes more
sense to fail the allocation rather than stall the caller in direct
reclaim. This patch skips direct reclaim if compaction is deferred
and the caller specifies __GFP_NO_KSWAPD.

Async compaction only considers a subset of pages so it is possible for
compaction to be deferred prematurely and not enter direct reclaim even
in cases where it should. To compensate for this, this patch also defers
compaction only if sync compaction failed.

Signed-off-by: Mel Gorman<mgorman@xxxxxxx>
Acked-by: Minchan Kim<minchan.kim@xxxxxxxxx>

Reviewed-by: Rik van Riel<riel@xxxxxxxxxx>

--
All rights reversed
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/