lkml.org 
[lkml]   [1997]   [Jun]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPage cache patch - 2'nd version
Hi all!
After reading all comments about my previous (broken) patch and browsing the
source code (vmscan.c and filemap.c) I prepared new version of the patch,
which should improve releasing page cache pages (and id does it for me).
The philosophy is different than in previous patch and (in my hope) not
broken. Instead of setting the "referenced" bit (and making the page inviolable),
page->age is set to zero for unrefernced shared pages, making them good
candidates for swapping out.
Warning! My patch may interfere with buffer patches written by Werner Fink, so
if you use them and want to try my patch, install it better by hand. It is
trivial.
Regards - Krzysztof Strasburger

And here is the patch:

--- linux/mm/filemap.c.orig Tue May 6 07:37:23 1997
+++ linux/mm/filemap.c Mon Jun 30 10:40:15 1997
@@ -187,7 +187,10 @@

default:
/* more than one users: we can't throw it away */
- set_bit(PG_referenced, &page->flags);
+ /* Original: make the shared page inviolable. */
+ /* >set_bit(PG_referenced, &page->flags); */
+ /* Modified: make it good candidate for swapping out. */
+ page->age = 0;
/* fall through */
case 0:
/* nothing */
\
 
 \ /
  Last update: 2005-03-22 13:39    [W:0.049 / U:0.032 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site