Browse Source

staging: android: lowmemorykiller: Ignore shmem pages in page-cache

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Arve Hjønnevåg 14 years ago
parent
commit
71b2c82bdf
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/staging/android/lowmemorykiller.c

+ 2 - 1
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