]> 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, 7 Sep 2012 00:23:12 +0000 (10:23 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 12 Sep 2012 07:08:24 +0000 (17:08 +1000)
commitb8178051483c888f3729fb82c90df29285e9a502
tree75d5033847718a00c3875db6fb3683f672c1ad71
parent31f6fc1b2a3709d1bf5c306fd25695cbf6cfeefc
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