Re: [PATCH] mm: Do not stall in synchronous compaction for THPallocations

From: Andrea Arcangeli
Date: Thu Nov 10 2011 - 09:01:07 EST


On Thu, Nov 10, 2011 at 10:06:16AM +0000, Mel Gorman wrote:
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 963c5de..cddc2d0 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -2213,7 +2213,13 @@ rebalance:
> sync_migration);
> if (page)
> goto got_pg;
> - sync_migration = true;
> +
> + /*
> + * Do not use sync migration for transparent hugepage allocations as
> + * it could stall writing back pages which is far worse than simply
> + * failing to promote a page.
> + */
> + sync_migration = !(gfp_mask & __GFP_NO_KSWAPD);
>
> /* Try direct reclaim and then allocating */
> page = __alloc_pages_direct_reclaim(gfp_mask, order,

Reviewed-by: Andrea Arcangeli <aarcange@xxxxxxxxxx>
--
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/