diff options
author | Krishna Reddy <vdumpa@nvidia.com> | 2014-09-26 17:14:03 -0700 |
---|---|---|
committer | Matthew Pedro <mapedro@nvidia.com> | 2014-11-06 20:21:36 -0800 |
commit | a9e231e93b688e72fea3d38c00e2a5cd6095fff0 (patch) | |
tree | 1155cc45da1dcd60aadf61e1b0304efca1ce7972 /drivers/staging | |
parent | 00457fe1c08f591cd82b133425cbf3e00be19ef7 (diff) |
android: lowmemkiller: don't consider CMA memory as free
As CMA memory can only be used for Movable allocations,
Android lowmemkiller shouldn't consider this as free memory
for lowmem kill decisions. If it considered as free memory,
It can delay the killing of apps and lead to slowness of
system as memory allocations start waiting for kswap
daemon to free up the memory.
Bug 1550455
Change-Id: Ica8da48ef48912d89cde526f0ba3676df6ab10f1
Signed-off-by: Krishna Reddy <vdumpa@nvidia.com>
Reviewed-on: http://git-master/r/542209
(cherry picked from commit 24a7d99f9117e250dbf276d453c336b31dc2c127)
Reviewed-on: http://git-master/r/592901
GVS: Gerrit_Virtual_Submit
Reviewed-by: Matthew Pedro <mapedro@nvidia.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/android/lowmemorykiller.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index 2c72aec6bb4c..30209e87b3bc 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -80,7 +80,8 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc) int selected_tasksize = 0; short selected_oom_score_adj; int array_size = ARRAY_SIZE(lowmem_adj); - int other_free = global_page_state(NR_FREE_PAGES) - totalreserve_pages + int other_free = global_page_state(NR_FREE_PAGES) - + global_page_state(NR_FREE_CMA_PAGES) - totalreserve_pages #ifdef CONFIG_TEGRA_NVMAP + nvmap_page_pool_get_unused_pages() #endif |