]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: compaction: capture a suitable high-order page immediately when it is made available
authorMel Gorman <mgorman@suse.de>
Wed, 26 Sep 2012 01:33:15 +0000 (11:33 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 07:25:43 +0000 (17:25 +1000)
commitdc2fe14fcac3662008da0667722668e3f00f0e50
tree97fa48cae258fb654ba4cb23ccf1b230d027e02c
parentc1242cf3f418842056a36fc2009823df45cd3d06
mm: compaction: capture a suitable high-order page immediately when it is made available

While compaction is migrating pages to free up large contiguous blocks for
allocation it races with other allocation requests that may steal these
blocks or break them up.  This patch alters direct compaction to capture a
suitable free page as soon as it becomes available to reduce this race.
It uses similar logic to split_free_page() to ensure that watermarks are
still obeyed.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Reviewed-by: Rik van Riel <riel@redhat.com>
Reviewed-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/compaction.h
include/linux/mm.h
mm/compaction.c
mm/internal.h
mm/page_alloc.c