Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!elroy!cit-vax!ucla-cs!zen!ucbvax!OKEEFFE.BERKELEY.EDU!bostic From: bostic@OKEEFFE.BERKELEY.EDU (Keith Bostic) Newsgroups: comp.bugs.4bsd.ucb-fixes Subject: V1.40 (fodkluster() and pagein() fixes) Message-ID: <8711122252.AA00954@okeeffe.Berkeley.EDU> Date: Thu, 12-Nov-87 17:52:34 EST Article-I.D.: okeeffe.8711122252.AA00954 Posted: Thu Nov 12 17:52:34 1987 Date-Received: Sat, 14-Nov-87 21:55:21 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 71 Approved: ucb-fixes@okeeffe.berkeley.edu Subject: fodkluster() and pagein() fixes Index: sys/sys/vm_page.c 4.3BSD Description: Fodkluster() can walk backwards past the 0 page, and pagein() doesn't correctly flush the buffer cache when it wants to page data in. Repeat-By: These aren't real repeatable. The first can happen, although very rarely; the second never fails on 4.3BSD due to the way the buffer cache works. Fix: Apply the following patch to vm_page.c. *** vm_page.c.orig Thu Nov 12 13:16:22 1987 --- vm_page.c Thu Nov 12 13:16:29 1987 *************** *** 3,9 **** * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)vm_page.c 7.1 (Berkeley) 6/5/86 */ #include "../machine/reg.h" --- 3,9 ---- * All rights reserved. The Berkeley software License Agreement * specifies the terms and conditions for redistribution. * ! * @(#)vm_page.c 7.2 (Berkeley) 7/27/86 */ #include "../machine/reg.h" *************** *** 365,371 **** * cache, so we explicitly flush them out to disk * so that the proper data will be paged in. */ ! blkflush(dev, bn, (long)CLSIZE*NBPG); #ifdef TRACE if (type != CTEXT) trace(TR_XFODMISS, dev, bn); --- 365,371 ---- * cache, so we explicitly flush them out to disk * so that the proper data will be paged in. */ ! blkflush(dev, bn, (long)klsize*CLSIZE*NBPG); #ifdef TRACE if (type != CTEXT) trace(TR_XFODMISS, dev, bn); *************** *** 1263,1271 **** bn = *pbn; v = v0; for (klsize = 1; klsize < KLMAX; klsize++) { ! v -= CLSIZE; ! if (v < vmin) break; fpte -= CLSIZE; if (fpte->pg_fod == 0) break; --- 1263,1271 ---- bn = *pbn; v = v0; for (klsize = 1; klsize < KLMAX; klsize++) { ! if (v <= vmin) break; + v -= CLSIZE; fpte -= CLSIZE; if (fpte->pg_fod == 0) break;