mm: mmzone: MIGRATE_CMA migration type added
authorMichal Nazarewicz <mina86@mina86.com>
Thu, 29 Dec 2011 12:09:50 +0000 (13:09 +0100)
committerGrazvydas Ignotas <notasas@gmail.com>
Mon, 25 Feb 2013 18:18:30 +0000 (20:18 +0200)
commit709d5028a5076973c13c26b5264c15c8e98cf26c
tree5bb0a25ac71bd2725dca2ae1cc6ccb5465cbc591
parent143040b55513cddb546bd81e95e07067152142f4
mm: mmzone: MIGRATE_CMA migration type added

The MIGRATE_CMA migration type has two main characteristics:
(i) only movable pages can be allocated from MIGRATE_CMA
pageblocks and (ii) page allocator will never change migration
type of MIGRATE_CMA pageblocks.

This guarantees (to some degree) that page in a MIGRATE_CMA page
block can always be migrated somewhere else (unless there's no
memory left in the system).

It is designed to be used for allocating big chunks (eg. 10MiB)
of physically contiguous memory.  Once driver requests
contiguous memory, pages from MIGRATE_CMA pageblocks may be
migrated away to create a contiguous block.

To minimise number of migrations, MIGRATE_CMA migration type
is the last type tried when page allocator falls back to other
migration types when requested.

Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Tested-by: Rob Clark <rob.clark@linaro.org>
Tested-by: Ohad Ben-Cohen <ohad@wizery.com>
Tested-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Tested-by: Robert Nelson <robertcnelson@gmail.com>
Tested-by: Barry Song <Baohua.Song@csr.com>
include/linux/gfp.h
include/linux/mmzone.h
mm/Kconfig
mm/compaction.c
mm/page_alloc.c
mm/vmstat.c