| From 71b2c82bdf67ab24716c536e10de436169d3574c Mon Sep 17 00:00:00 2001 |
| From: =?UTF-8?q?Arve=20Hj=C3=B8nnev=C3=A5g?= <arve@android.com> |
| Date: Tue, 23 Nov 2010 17:29:04 -0800 |
| Subject: staging: android: lowmemorykiller: Ignore shmem pages in |
| page-cache |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| Patch-mainline: HEAD |
| Git-commit: 71b2c82bdf67ab24716c536e10de436169d3574c |
| |
| Signed-off-by: Arve Hjønnevåg <arve@android.com> |
| Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> |
| |
| diff --git a/drivers/staging/android/lowmemorykiller.c b/drivers/staging/android/lowmemorykiller.c |
| index 93a1758..0ae08ad 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 |