diff options
author | green <green@FreeBSD.org> | 2005-06-10 23:50:41 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 2005-06-10 23:50:41 +0000 |
commit | ff904ffb643a4538cfbfba4658052e1b36e2bfe5 (patch) | |
tree | 4eeddcd51bbe2b1f2ab59415946715327f429a80 /sys/nfsclient/nfsmount.h | |
parent | 613f0c4df2e951f81d91d8550f1ce05c8aa55f2d (diff) | |
download | FreeBSD-src-ff904ffb643a4538cfbfba4658052e1b36e2bfe5.zip FreeBSD-src-ff904ffb643a4538cfbfba4658052e1b36e2bfe5.tar.gz |
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
Diffstat (limited to 'sys/nfsclient/nfsmount.h')
-rw-r--r-- | sys/nfsclient/nfsmount.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/nfsclient/nfsmount.h b/sys/nfsclient/nfsmount.h index 7f23aaa..a8bcc14 100644 --- a/sys/nfsclient/nfsmount.h +++ b/sys/nfsclient/nfsmount.h @@ -74,6 +74,7 @@ struct nfsmount { int nm_wsize; /* Max size of write rpc */ int nm_readdirsize; /* Size of a readdir rpc */ int nm_readahead; /* Num. of blocks to readahead */ + int nm_wcommitsize; /* Max size of commit for write */ int nm_acdirmin; /* Directory attr cache min lifetime */ int nm_acdirmax; /* Directory attr cache max lifetime */ int nm_acregmin; /* Reg file attr cache min lifetime */ |