git: NFS - Fix remaining VM/BIO issues
Matthew Dillon
dillon at crater.dragonflybsd.org
Fri Aug 28 10:56:18 PDT 2009
commit a63246d16b71ec43a2effedf45c2602629c764fd
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Fri Aug 28 09:47:44 2009 -0700
NFS - Fix remaining VM/BIO issues
The only bug that could not be resolved by the previous commit is related
to the use of dynamic buffer sizing for the buffer that straddles the
EOF of the file. For example, if a file is 32768+4127 bytes then the
second buffer cache buffer would have a size of 4127 bytes instead of
32768 bytes. Because the EOF point can move around and NFS does not
keep good track of it buffers with weird sizes could build up in the
system and interfere with operations against backing VM pages.
In particular truncations followed by seek-write extensions would
interfere with mmap()'s areas around the original (now non-applicable)
truncation point.
It was not possible to fix this bug while still keeping the dynamic
buffer sizing, so this patch converts NFS's buffer cache operations
to use fixed-sized buffers in all cases. This leads to more wasted
memory when dealing with small files and further optimizations may be
attempted in the future, but it seems to solve issues with BIO/VM
interactions.
* Fsx now survives an overnight pass.
* Buildworld now survives multiple passes when using a writable NFS /usr/obj.
* Fix umount sequencing. Sometimes the rxthread would get into a
reconnect loop and not exit.
Summary of changes:
sys/vfs/nfs/nfs.h | 4 +-
sys/vfs/nfs/nfs_bio.c | 363 +++++++++++++++++++---------------------------
sys/vfs/nfs/nfs_iod.c | 5 +-
sys/vfs/nfs/nfs_socket.c | 4 +
sys/vfs/nfs/nfs_vnops.c | 26 +++-
sys/vfs/nfs/nfsnode.h | 2 +-
6 files changed, 176 insertions(+), 228 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a63246d16b71ec43a2effedf45c2602629c764fd
--
DragonFly BSD source repository
More information about the Commits
mailing list