[1057] in testers
VAX,RT 7.1: text caching
daemon@ATHENA.MIT.EDU (daemon@ATHENA.MIT.EDU)
Sun Aug 12 20:39:40 1990
Date: Sun, 12 Aug 90 20:39:16 -0400
To: testers@MIT.EDU, don@MIT.EDU
From: Richard Basch <probe@MIT.EDU>
Besides, the problem with "empty text", there is a logic bug in xfree()
in sys/vm_text.c
if ( maxtextcache > 0) {
CACHE_AT_TAIL(xp);
}
while ( xcache > maxtextcache) { /* cache overflow */
xuntext(x_lru);
}
should read:
if ( maxtextcache > 0) {
CACHE_AT_TAIL(xp);
}
while (xcache > maxtextcache && xcache > 0) {
/* cache overflow */
xuntext(x_lru);
}
The extra test should be added, since a negative "maxtextcache" (other
than -1) also signifies that text caching should not be done. Some
kernel modules, such as AFS (currently disabled in our implementation),
expect that negative maxtextcache values other than -1 will also disable
caching. The original code would not deal with this case.
-Richard