summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfsargs.h
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>2005-06-10 23:50:41 +0000
committergreen <green@FreeBSD.org>2005-06-10 23:50:41 +0000
commitff904ffb643a4538cfbfba4658052e1b36e2bfe5 (patch)
tree4eeddcd51bbe2b1f2ab59415946715327f429a80 /sys/nfsclient/nfsargs.h
parent613f0c4df2e951f81d91d8550f1ce05c8aa55f2d (diff)
downloadFreeBSD-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/nfsargs.h')
-rw-r--r--sys/nfsclient/nfsargs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfsclient/nfsargs.h b/sys/nfsclient/nfsargs.h
index 8aa2392..7ebf1a0 100644
--- a/sys/nfsclient/nfsargs.h
+++ b/sys/nfsclient/nfsargs.h
@@ -56,7 +56,7 @@ struct nfs_args {
int retrans; /* times to retry send */
int maxgrouplist; /* Max. size of group list */
int readahead; /* # of blocks to readahead */
- int __pad1; /* was "leaseterm" */
+ int wcommitsize; /* Max. write commit size in bytes */
int deadthresh; /* Retrans threshold */
char *hostname; /* server's name */
int acregmin; /* cache attrs for reg files min time */
@@ -80,7 +80,7 @@ struct nfs_args {
#define NFSMNT_NFSV3 0x00000200 /* Use NFS Version 3 protocol */
/* 0x400 free, was NFSMNT_KERB */
#define NFSMNT_DUMBTIMR 0x00000800 /* Don't estimate rtt dynamically */
-/* 0x1000 free, was NFSMNT_LEASETERM */
+#define NFSMNT_WCOMMITSIZE 0x00001000 /* set max write commit size */
#define NFSMNT_READAHEAD 0x00002000 /* set read ahead */
#define NFSMNT_DEADTHRESH 0x00004000 /* set dead server retry thresh */
#define NFSMNT_RESVPORT 0x00008000 /* Allocate a reserved port */
OpenPOWER on IntegriCloud