staging: android: lowmemorykiller: Ignore shmem pages in page-cache
authorArve Hjønnevåg <arve@android.com>
Wed, 24 Nov 2010 01:29:04 +0000 (17:29 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 30 Nov 2011 12:20:51 +0000 (21:20 +0900)
Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/android/lowmemorykiller.c

index 93a1758b5c08a5897df73cb3729b3c98450855a1..0ae08adb68f2c6e77dca3d6cd47ae0b47f179b03 100644 (file)
@@ -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