From owner-freebsd-current Thu Aug 13 19:44:45 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id TAA05791 for freebsd-current-outgoing; Thu, 13 Aug 1998 19:44:45 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.6.133]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id TAA05786 for ; Thu, 13 Aug 1998 19:44:44 -0700 (PDT) (envelope-from tlambert@usr02.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.8/8.8.8) id TAA29919 for ; Thu, 13 Aug 1998 19:44:17 -0700 (MST) Received: from usr02.primenet.com(206.165.6.202) via SMTP by smtp03.primenet.com, id smtpd029888; Thu Aug 13 19:44:08 1998 Received: (from tlambert@localhost) by usr02.primenet.com (8.8.5/8.8.5) id TAA26443 for current@freeBSD.org; Thu, 13 Aug 1998 19:44:08 -0700 (MST) From: Terry Lambert Message-Id: <199808140244.TAA26443@usr02.primenet.com> Subject: Tentative fix for VM bug To: current@FreeBSD.ORG Date: Fri, 14 Aug 1998 02:44:08 +0000 (GMT) X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG A posting about NFS problems to the -hackers list gave me the clue I needed. I believe I have a fix for the VM bug. Would people running -current *AND* experiencing: o zeroed pages that shouldn't be o process hangs sleeping in "vmopar" o nfs client instability when executing programs or accessing files from the server (ie: mailboxes, etc., using lockfiles) o parts of files getting written to other files (that's me) o file corruption when accessing files via two routes (either two processes, or one process that both mmap's and extends the file via a descriptor). Please try this patch? Thanks... Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. ========================================================================= *** vm_object.c Thu May 21 07:47:58 1998 --- vm_object.c.good Fri Aug 14 02:08:15 1998 *************** *** 1348,1353 **** --- 1348,1354 ---- } } } else { + s = 0; while (size > 0) { if ((p = vm_page_lookup(object, start)) != 0) { *************** *** 1356,1361 **** --- 1357,1363 ---- vm_page_protect(p, VM_PROT_NONE); start += 1; size -= 1; + s = 1; continue; } *************** *** 1363,1376 **** * The busy flags are only cleared at * interrupt -- minimize the spl transitions */ ! if (vm_page_sleep(p, "vmopar", &p->busy)) goto again; if (clean_only && p->valid) { vm_page_test_dirty(p); if (p->valid & p->dirty) { start += 1; size -= 1; continue; } } --- 1365,1381 ---- * The busy flags are only cleared at * interrupt -- minimize the spl transitions */ ! if (vm_page_sleep(p, "vmopar", &p->busy)) { ! start -= s; goto again; + } if (clean_only && p->valid) { vm_page_test_dirty(p); if (p->valid & p->dirty) { start += 1; size -= 1; + s = 1; continue; } } *************** *** 1381,1386 **** --- 1386,1392 ---- } start += 1; size -= 1; + s = 1; } } vm_object_pip_wakeup(object); ========================================================================= To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message