]> Git Repo - linux.git/commit
mm: cma: discard clean pages during contiguous allocation instead of migration
authorMinchan Kim <[email protected]>
Mon, 8 Oct 2012 23:31:55 +0000 (16:31 -0700)
committerLinus Torvalds <[email protected]>
Tue, 9 Oct 2012 07:22:43 +0000 (16:22 +0900)
commit02c6de8d757cb32c0829a45d81c3dfcbcafd998b
tree0d8f0d182a44ba4ec4af0c909d01eb663e03e254
parent70400303ce0c4ced3139499c676d5c79636b0c72
mm: cma: discard clean pages during contiguous allocation instead of migration

Drop clean cache pages instead of migration during alloc_contig_range() to
minimise allocation latency by reducing the amount of migration that is
necessary.  It's useful for CMA because latency of migration is more
important than evicting the background process's working set.  In
addition, as pages are reclaimed then fewer free pages for migration
targets are required so it avoids memory reclaiming to get free pages,
which is a contributory factor to increased latency.

I measured elapsed time of __alloc_contig_migrate_range() which migrates
10M in 40M movable zone in QEMU machine.

Before - 146ms, After - 7ms

[[email protected]: fix nommu build]
Signed-off-by: Mel Gorman <[email protected]>
Signed-off-by: Minchan Kim <[email protected]>
Reviewed-by: Mel Gorman <[email protected]>
Cc: Marek Szyprowski <[email protected]>
Acked-by: Michal Nazarewicz <[email protected]>
Cc: Rik van Riel <[email protected]>
Tested-by: Kyungmin Park <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/linux/rmap.h
mm/internal.h
mm/page_alloc.c
mm/vmscan.c
This page took 0.055318 seconds and 4 git commands to generate.