]> 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>
Thu, 13 Sep 2012 00:58:32 +0000 (10:58 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Sep 2012 05:30:00 +0000 (15:30 +1000)
commit3d1f49fe608f15da0da259106a83ac9f0e81dcdb
tree6a337dec73a961eb98eb4ef1463b2a68d97772ef
parent87ddd4a3264c72e43e32ed6ad0edda9856bca1c2
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