]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mm: compaction: perform a faster migration scan when migrating asynchronously
authorMel Gorman <mel@csn.ul.ie>
Thu, 13 Jan 2011 23:45:59 +0000 (15:45 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 14 Jan 2011 01:32:34 +0000 (17:32 -0800)
commit9927af740b1b9b1e769310bd0b91425e8047b803
tree5195dfbe36ece987f7e3d7c04b87327a20b16ea6
parent7f0f24967b0349798803260b2e4bf347cffa1990
mm: compaction: perform a faster migration scan when migrating asynchronously

try_to_compact_pages() is initially called to only migrate pages
asychronously and kswapd always compacts asynchronously.  Both are being
optimistic so it is important to complete the work as quickly as possible
to minimise stalls.

This patch alters the scanner when asynchronous to only consider
MIGRATE_MOVABLE pageblocks as migration candidates.  This reduces stalls
when allocating huge pages while not impairing allocation success rates as
a full scan will be performed if necessary after direct reclaim.

Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Rik van Riel <riel@redhat.com>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/compaction.c