summaryrefslogtreecommitdiffstats
path: root/mm/filemap.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-04-05 11:23:36 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-04-05 11:23:36 +0000
commit4318fbda2a7ee51caafdc4eb1f8028a3f0605142 (patch)
treecddb50a81d7d1a628cc400519162080c6d87868e /mm/filemap.c
parent36ea5120664550fae6d31f1c6f695e4f8975cb06 (diff)
o Merge with Linux 2.1.91.
o First round of bugfixes for the SC/MC CPUs. o FPU context switch fixes. o Lazy context switches. o Faster syscalls. o Removed dead code. o Shitloads of other things I forgot ...
Diffstat (limited to 'mm/filemap.c')
-rw-r--r--mm/filemap.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 7a4e20e21..0971c63b7 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -150,6 +150,10 @@ int shrink_mmap(int priority, int gfp_mask)
}
tmp = tmp->b_this_page;
} while (tmp != bh);
+
+ /* Refuse to swap out all buffer pages */
+ if ((buffermem >> PAGE_SHIFT) * 100 < (buffer_mem.min_percent * num_physpages))
+ goto next;
}
/* We can't throw away shared pages, but we do mark
@@ -167,7 +171,7 @@ int shrink_mmap(int priority, int gfp_mask)
break;
}
age_page(page);
- if (page->age)
+ if (page->age || page_cache_size * 100 < (page_cache.min_percent * num_physpages))
break;
if (PageSwapCache(page)) {
delete_from_swap_cache(page);