From: Arve Hjønnevåg Date: Wed, 24 Nov 2010 01:29:04 +0000 (-0800) Subject: staging: android: lowmemorykiller: Ignore shmem pages in page-cache X-Git-Tag: firefly_0821_release~3680^2~3804^2~101^2~119 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=71b2c82bdf67ab24716c536e10de436169d3574c;p=firefly-linux-kernel-4.4.55.git staging: android: lowmemorykiller: Ignore shmem pages in page-cache Signed-off-by: Arve Hjønnevåg Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c index 93a1758b5c08..0ae08adb68f2 100644 --- a/drivers/staging/android/lowmemorykiller.c +++ b/drivers/staging/android/lowmemorykiller.c @@ -91,7 +91,8 @@ static int lowmem_shrink(struct shrinker *s, int nr_to_scan, gfp_t gfp_mask) int selected_oom_adj; int array_size = ARRAY_SIZE(lowmem_adj); int other_free = global_page_state(NR_FREE_PAGES); - int other_file = global_page_state(NR_FILE_PAGES); + int other_file = global_page_state(NR_FILE_PAGES) - + global_page_state(NR_SHMEM); /* * If we already have a death outstanding, then