summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLiam Mark <lmark@codeaurora.org>2013-03-27 12:34:51 -0700
committerJeevan Shriram <jshriram@codeaurora.org>2016-04-13 11:09:54 -0700
commit92c1fefed56e839edbcce0d3cc734a53ed477394 (patch)
tree2f1dbb0d88acfe5a4141e54d84b3a90d6b742ac5 /include/linux
parente4c1c94265a50d396d7bd4655f3bcc945dc774c4 (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 'include/linux')
-rw-r--r--include/linux/mmzone.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index 423d214f708b..8a5894308eb2 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -63,6 +63,14 @@ enum {
MIGRATE_TYPES
};
+/*
+ * Returns a list which contains the migrate types on to which
+ * an allocation falls back when the free list for the migrate
+ * type mtype is depleted.
+ * The end of the list is delimited by the type MIGRATE_TYPES.
+ */
+extern int *get_migratetype_fallbacks(int mtype);
+
#ifdef CONFIG_CMA
bool is_cma_pageblock(struct page *page);
# define is_migrate_cma(migratetype) unlikely((migratetype) == MIGRATE_CMA)