freebsd-dev/sys/nfsclient
Brian Feldman cc3149b1ea Fix a serious deadlock with the NFS client. Given a large enough
atomic write request, it can fill the buffer cache with the entirety
of that write in order to handle retries.  However, it never drops
the vnode lock, or else it wouldn't be atomic, so it ends up waiting
indefinitely for more buf memory that cannot be gotten as it has it
all, and it waits in an uncancellable state.

To fix this, hibufspace is exported and scaled to a reasonable
fraction.  This is used as the limit of how much of an atomic write
request by the NFS client will be handled asynchronously.  If the
request is larger than this, it will be turned into a synchronous
request which won't deadlock the system.  It's possible this value is
far off from what is required by some, so it shall be tunable as soon
as mount_nfs(8) learns of the new field.

The slowdown between an asynchronous and a synchronous write on NFS
appears to be on the order of 2x-4x.

General nod by:	gad
MFC after:	2 weeks
More testing:	wes
PR:		kern/79208
2005-06-10 23:50:41 +00:00
..
bootp_subr.c
krpc_subr.c
krpc.h
nfs_bio.c Fix a serious deadlock with the NFS client. Given a large enough 2005-06-10 23:50:41 +00:00
nfs_diskless.c
nfs_lock.c
nfs_lock.h
nfs_nfsiod.c
nfs_node.c
nfs_socket.c
nfs_subs.c
nfs_vfsops.c Fix a serious deadlock with the NFS client. Given a large enough 2005-06-10 23:50:41 +00:00
nfs_vnops.c
nfs.h
nfsargs.h Fix a serious deadlock with the NFS client. Given a large enough 2005-06-10 23:50:41 +00:00
nfsdiskless.h
nfsm_subs.h
nfsmount.h Fix a serious deadlock with the NFS client. Given a large enough 2005-06-10 23:50:41 +00:00
nfsnode.h
nfsstats.h
nlminfo.h