On Sun, 29 Nov 1998 11:35:50 +1030 (CST), Mofeed Shahin
<shahin@labf.org> said:
> I just upgraded to 2.1.130 from 2.0.36, and I was suprised at a couple of
> things.
> - This morning when I went to start using my machine it seems that my
> xterms were put into swap.
Try the patch below.
--Stephen
----------------------------------------------------------------
--- mm/filemap.c.~1~ Thu Nov 26 18:48:52 1998
+++ mm/filemap.c Fri Nov 27 12:45:03 1998
@@ -200,8 +200,8 @@
struct page * page;
int count_max, count_min;
- count_max = (limit<<1) >> (priority>>1);
- count_min = (limit<<1) >> (priority);
+ count_max = limit;
+ count_min = (limit<<2) >> (priority);
page = mem_map + clock;
do {
@@ -214,7 +214,15 @@
if (shrink_one_page(page, gfp_mask))
return 1;
count_max--;
- if (page->inode || page->buffers)
+ /*
+ * If the page we looked at was recyclable but we didn't
+ * reclaim it (presumably due to PG_referenced), don't
+ * count it as scanned. This way, the more referenced
+ * page cache pages we encounter, the more rapidly we
+ * will age them.
+ */
+ if (atomic_read(&page->count) != 1 ||
+ (!page->inode && !page->buffers))
count_min--;
page++;
clock++;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/