From: CMY Date: Mon, 23 Jun 2014 02:11:35 +0000 (+0800) Subject: rk: lowmemorykiller: calculator free pages exclude CMA's free X-Git-Tag: firefly_0821_release~5064 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=217438370d14db4a9f8d7851109f0073c5dcebac;p=firefly-linux-kernel-4.4.55.git rk: lowmemorykiller: calculator free pages exclude CMA's free --- diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index a56e0894f668..db571b8f0c8d 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -77,7 +77,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) - totalreserve_pages - + global_page_state(NR_FREE_CMA_PAGES); int other_file = global_page_state(NR_FILE_PAGES) - global_page_state(NR_SHMEM);