freebsd-nq/sys/vm
Alan Cox 4221e284a3 The VFS/BIO subsystem contained a number of hacks in order to optimize
piecemeal, middle-of-file writes for NFS.  These hacks have caused no
end of trouble, especially when combined with mmap().  I've removed
them.  Instead, NFS will issue a read-before-write to fully
instantiate the struct buf containing the write.  NFS does, however,
optimize piecemeal appends to files.  For most common file operations,
you will not notice the difference.  The sole remaining fragment in
the VFS/BIO system is b_dirtyoff/end, which NFS uses to avoid cache
coherency issues with read-merge-write style operations.  NFS also
optimizes the write-covers-entire-buffer case by avoiding the
read-before-write.  There is quite a bit of room for further
optimization in these areas.

The VM system marks pages fully-valid (AKA vm_page_t->valid =
VM_PAGE_BITS_ALL) in several places, most noteably in vm_fault.  This
is not correct operation.  The vm_pager_get_pages() code is now
responsible for marking VM pages all-valid.  A number of VM helper
routines have been added to aid in zeroing-out the invalid portions of
a VM page prior to the page being marked all-valid.  This operation is
necessary to properly support mmap().  The zeroing occurs most often
when dealing with file-EOF situations.  Several bugs have been fixed
in the NFS subsystem, including bits handling file and directory EOF
situations and buf->b_flags consistancy issues relating to clearing
B_ERROR & B_INVAL, and handling B_DONE.

getblk() and allocbuf() have been rewritten.  B_CACHE operation is now
formally defined in comments and more straightforward in
implementation.  B_CACHE for VMIO buffers is based on the validity of
the backing store.  B_CACHE for non-VMIO buffers is based simply on
whether the buffer is B_INVAL or not (B_CACHE set if B_INVAL clear,
and vise-versa).  biodone() is now responsible for setting B_CACHE
when a successful read completes.  B_CACHE is also set when a bdwrite()
is initiated and when a bwrite() is initiated.  VFS VOP_BWRITE
routines (there are only two - nfs_bwrite() and bwrite()) are now
expected to set B_CACHE.  This means that bowrite() and bawrite() also
set B_CACHE indirectly.

There are a number of places in the code which were previously using
buf->b_bufsize (which is DEV_BSIZE aligned) when they should have
been using buf->b_bcount.  These have been fixed.  getblk() now clears
B_DONE on return because the rest of the system is so bad about
dealing with B_DONE.

Major fixes to NFS/TCP have been made.  A server-side bug could cause
requests to be lost by the server due to nfs_realign() overwriting
other rpc's in the same TCP mbuf chain.  The server's kernel must be
recompiled to get the benefit of the fixes.

Submitted by:	Matthew Dillon <dillon@apollo.backplane.com>
1999-05-02 23:57:16 +00:00
..
default_pager.c vm_pager_put_pages() is passed an rcval array to hold per-page return 1999-01-24 02:32:15 +00:00
default_pager.h
device_pager.c vm_pager_put_pages() is passed an rcval array to hold per-page return 1999-01-24 02:32:15 +00:00
pmap.h Make pmap_collect() an official pmap interface. 1999-04-23 20:29:58 +00:00
swap_pager.c Submitted by: Matt Dillon <dillon@freebsd.org> 1999-03-14 09:20:01 +00:00
swap_pager.h vm_pager_put_pages() is passed an rcval array to hold per-page return 1999-01-24 02:32:15 +00:00
vm_extern.h Move the declaration of faultin() from the vm headers to proc.h, since 1999-04-13 19:17:15 +00:00
vm_fault.c The VFS/BIO subsystem contained a number of hacks in order to optimize 1999-05-02 23:57:16 +00:00
vm_glue.c Only use p->p_lock (manage by PHOLD()/PRELE()) - P_NOSWAP/P_PHYSIO is no 1999-04-06 03:11:34 +00:00
vm_inherit.h
vm_init.c Back out DIAGNOSTIC changes. 1998-02-06 12:14:30 +00:00
vm_kern.c Correct a problem in kmem_malloc: A kmem_malloc allowing "wait" may 1999-03-16 07:39:07 +00:00
vm_kern.h Attempt to fix the previous fix to the contigmalloc1 prototype. 1997-10-11 10:39:19 +00:00
vm_map.c Two changes to vm_map_delete: 1999-04-04 07:11:02 +00:00
vm_map.h Upgrading a map's lock to exclusive status should increment 1999-03-06 07:11:33 +00:00
vm_meter.c Remove MAP_ENTRY_IS_A_MAP 'share' maps. These maps were once used to 1999-02-07 21:48:23 +00:00
vm_mmap.c Suser() simplification: 1999-04-27 11:18:52 +00:00
vm_object.c Correct two optimization errors in vm_object_page_remove: 1999-03-14 06:36:00 +00:00
vm_object.h Revamp vm_object_[q]collapse(). Despite the complexity of this patch, 1999-02-08 19:00:15 +00:00
vm_page.c The VFS/BIO subsystem contained a number of hacks in order to optimize 1999-05-02 23:57:16 +00:00
vm_page.h The VFS/BIO subsystem contained a number of hacks in order to optimize 1999-05-02 23:57:16 +00:00
vm_pageout.c Make pmap_collect() an official pmap interface. 1999-04-23 20:29:58 +00:00
vm_pageout.h This is a rather large commit that encompasses the new swapper, 1999-01-21 08:29:12 +00:00
vm_pager.c The VFS/BIO subsystem contained a number of hacks in order to optimize 1999-05-02 23:57:16 +00:00
vm_pager.h The VFS/BIO subsystem contained a number of hacks in order to optimize 1999-05-02 23:57:16 +00:00
vm_param.h There is a comment in vm_param.h which doesn't belong to the 1998-07-22 06:21:55 +00:00
vm_prot.h
vm_swap.c s/static foo_devsw_installed = 0;/static int foo_devsw_installed;/. 1999-04-28 10:54:24 +00:00
vm_unix.c Removed ENOMEM error on swap_pager_full condition which ignored the 1999-02-22 08:42:16 +00:00
vm_zone.c KNFize, by bde. 1999-01-10 01:58:29 +00:00
vm_zone.h KNFize, by bde. 1999-01-10 01:58:29 +00:00
vm.h
vnode_pager.c The VFS/BIO subsystem contained a number of hacks in order to optimize 1999-05-02 23:57:16 +00:00
vnode_pager.h Fixed two potentially serious classes of bugs: 1998-10-13 08:24:45 +00:00