Date: Fri, 14 Aug 1998 02:44:08 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: current@FreeBSD.ORG Subject: Tentative fix for VM bug Message-ID: <199808140244.TAA26443@usr02.primenet.com>
index | next in thread | raw e-mail
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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808140244.TAA26443>
