diff options
author | dg <dg@FreeBSD.org> | 1995-05-21 21:39:31 +0000 |
---|---|---|
committer | dg <dg@FreeBSD.org> | 1995-05-21 21:39:31 +0000 |
commit | 2045200a00d5a826198657a527d69a42e76d7b98 (patch) | |
tree | 07e1ad65c2ce70cb5c077eecec53a0a1544d9f49 /sys/vm | |
parent | 3af82d16aabbc7028c07a0cf9039673cb89f0755 (diff) | |
download | FreeBSD-src-2045200a00d5a826198657a527d69a42e76d7b98.zip FreeBSD-src-2045200a00d5a826198657a527d69a42e76d7b98.tar.gz |
Changes to fix the following bugs:
1) Files weren't properly synced on filesystems other than UFS. In some
cases, this lead to lost data. Most likely would be noticed on NFS.
The fix is to make the VM page sync/object_clean general rather than
in each filesystem.
2) Mixing regular and mmaped file I/O on NFS was very broken. It caused
chunks of files to end up as zeroes rather than the intended contents.
The fix was to fix several race conditions and to kludge up the
"b_dirtyoff" and "b_dirtyend" that NFS relies upon - paying attention
to page modifications that occurred via the mmapping.
Reviewed by: David Greenman
Submitted by: John Dyson
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_object.c | 3 | ||||
-rw-r--r-- | sys/vm/vm_pageout.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/sys/vm/vm_object.c b/sys/vm/vm_object.c index e3b47eb..1d5ee25 100644 --- a/sys/vm/vm_object.c +++ b/sys/vm/vm_object.c @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_object.c,v 1.44 1995/04/21 02:48:40 dyson Exp $ + * $Id: vm_object.c,v 1.45 1995/05/02 05:57:10 davidg Exp $ */ /* @@ -328,6 +328,7 @@ vm_object_deallocate(object) */ if (object->flags & OBJ_CANPERSIST) { if (object->resident_page_count != 0) { + vm_object_page_clean(object, 0, 0 ,TRUE); TAILQ_INSERT_TAIL(&vm_object_cached_list, object, cached_list); vm_object_cached++; diff --git a/sys/vm/vm_pageout.c b/sys/vm/vm_pageout.c index 3b54c9e..79d28c9 100644 --- a/sys/vm/vm_pageout.c +++ b/sys/vm/vm_pageout.c @@ -65,7 +65,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_pageout.c,v 1.48 1995/04/17 10:00:55 davidg Exp $ + * $Id: vm_pageout.c,v 1.49 1995/05/10 18:56:06 davidg Exp $ */ /* @@ -834,7 +834,7 @@ vm_pageout() */ cnt.v_pageout_free_min = 6 + cnt.v_page_count / 1024 + cnt.v_interrupt_free_min; - cnt.v_free_reserved = cnt.v_pageout_free_min + 2; + cnt.v_free_reserved = cnt.v_pageout_free_min + 6; cnt.v_free_target = 3 * cnt.v_free_min + cnt.v_free_reserved; cnt.v_free_min += cnt.v_free_reserved; |