]> 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>
Fri, 28 Sep 2012 00:19:10 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 5 Oct 2012 04:00:48 +0000 (14:00 +1000)
commit498ffe36d8faee988e12f0776da6539d8b2c4149
tree7fadf91b77d5652f24691ba025763f7958041ce7
parent48d9cb70a4fc6eb55e75558cebc4e31530523eb2
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