Replace the huge mess that was vnode_pager_generic_getpages() with a much
authorMatthew Dillon <dillon@dragonflybsd.org>
Mon, 13 Aug 2007 17:18:16 +0000 (17:18 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Mon, 13 Aug 2007 17:18:16 +0000 (17:18 +0000)
commita05863a7a4b2d99b1c53377d8a6717619ed5d21a
tree7dc2236a4deb3764ffd838618a7a97fac5b75483
parentf946e8c127593bfa0cd700697e9fa2f27c3bf84d
Replace the huge mess that was vnode_pager_generic_getpages() with a much
simpler version which does a UIO_NOCOPY VOP_READ.  This version requires
that all VREG file I/O pass through the buffer cache.  All filesystems
which use this function already use the buffer cache.

* specfs rolls its own for device mmaps.
* NFS rolls its own.
* UFS rolls its own by backs down to this function in certain cases.
* Remaining filesystems call this function and use the buffer cache (ext2,
  hpfs, isofs, msdosfs, ntfs, nwfs, smbfs), and are compatible.

Buffer cache side effects properly set the valid bits in the vm_page_t
and vm_faults in DragonFly are now responsible for zero-filling mapped VM
pages, so the vnode_pager*() code no longer has to do this.

The vnode_pager*() code was previously using getpbuf() and pmap_qenter() and
friends which is almost as expensive as instantiating a new buffer cache
buffer.  The vnode_pager*() code also previously ran a manual BMAP whereas
the buffer cache may already have a cached translation available.
sys/vm/vnode_pager.c