diff options
author | Liam Mark <lmark@codeaurora.org> | 2013-03-27 12:34:51 -0700 |
---|---|---|
committer | Jeevan Shriram <jshriram@codeaurora.org> | 2016-04-13 11:09:54 -0700 |
commit | 92c1fefed56e839edbcce0d3cc734a53ed477394 (patch) | |
tree | 2f1dbb0d88acfe5a4141e54d84b3a90d6b742ac5 /mm/page_alloc.c | |
parent | e4c1c94265a50d396d7bd4655f3bcc945dc774c4 (diff) |
android/lowmemorykiller: Selectively count free CMA pages
In certain memory configurations there can be a large number of
CMA pages which are not suitable to satisfy certain memory
requests.
This large number of unsuitable pages can cause the
lowmemorykiller to not kill any tasks because the
lowmemorykiller counts all free pages.
In order to ensure the lowmemorykiller properly evaluates the
free memory only count the free CMA pages if they are suitable
for satisfying the memory request.
Change-Id: I7f06d53e2d8cfe7439e5561fe6e5209ce73b1c90
CRs-fixed: 437016
Signed-off-by: Liam Mark <lmark@codeaurora.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index d63689fda9b4..1eafd75f402e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1466,6 +1466,11 @@ static int fallbacks[MIGRATE_TYPES][4] = { #endif }; +int *get_migratetype_fallbacks(int mtype) +{ + return fallbacks[mtype]; +} + #ifdef CONFIG_CMA static struct page *__rmqueue_cma_fallback(struct zone *zone, unsigned int order) |