diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2012-01-25 12:49:24 +0100 |
---|---|---|
committer | Ziyan <jaraidaniel@gmail.com> | 2016-04-03 14:56:06 +0200 |
commit | 300436c85b3a1d383cfcb4e2b9fa7c60d3976477 (patch) | |
tree | 5a8a19c68e87eec1825a1211cdf5d5fd867eadc8 /include | |
parent | 64fcbe4a21994ed867dbff7b18dd6172a23dc601 (diff) | |
download | kernel_samsung_tuna-300436c85b3a1d383cfcb4e2b9fa7c60d3976477.zip kernel_samsung_tuna-300436c85b3a1d383cfcb4e2b9fa7c60d3976477.tar.gz kernel_samsung_tuna-300436c85b3a1d383cfcb4e2b9fa7c60d3976477.tar.bz2 |
mm: trigger page reclaim in alloc_contig_range() to stabilise watermarks
alloc_contig_range() performs memory allocation so it also should keep
track on keeping the correct level of memory watermarks. This commit adds
a call to *_slowpath style reclaim to grab enough pages to make sure that
the final collection of contiguous pages from freelists will not starve
the system.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Michal Nazarewicz <mina86@mina86.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>
Conflicts:
mm/page_alloc.c
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mmzone.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 2cc4ab1..9a5c2ee 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -63,8 +63,10 @@ enum { #ifdef CONFIG_CMA # define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA) +# define cma_wmark_pages(zone) zone->min_cma_pages #else # define is_migrate_cma(migratetype) false +# define cma_wmark_pages(zone) 0 #endif #define for_each_migratetype_order(order, type) \ @@ -354,6 +356,13 @@ struct zone { /* see spanned/present_pages for more description */ seqlock_t span_seqlock; #endif +#ifdef CONFIG_CMA + /* + * CMA needs to increase watermark levels during the allocation + * process to make sure that the system is not starved. + */ + unsigned long min_cma_pages; +#endif struct free_area free_area[MAX_ORDER]; #ifndef CONFIG_SPARSEMEM |