diff options
author | dfr <dfr@FreeBSD.org> | 1996-11-06 10:53:16 +0000 |
---|---|---|
committer | dfr <dfr@FreeBSD.org> | 1996-11-06 10:53:16 +0000 |
commit | 4c8f7388e578751aab31ce0b8a982373a002aa7e (patch) | |
tree | b99fa8ba7a7ef13dafb400913ede1cef59f59743 /sys/nfsclient/nfs_vfsops.c | |
parent | d7d2cfcbf0e341b9b9672dcde6e1be024ed506b9 (diff) | |
download | FreeBSD-src-4c8f7388e578751aab31ce0b8a982373a002aa7e.zip FreeBSD-src-4c8f7388e578751aab31ce0b8a982373a002aa7e.tar.gz |
Improve the queuing algorithms used by NFS' asynchronous i/o. The
existing mechanism uses a global queue for some buffers and the
vp->b_dirtyblkhd queue for others. This turns sequential writes into
randomly ordered writes to the server, affecting both read and write
performance. The existing mechanism also copes badly with hung
servers, tending to block accesses to other servers when all the iods
are waiting for a hung server.
The new mechanism uses a queue for each mount point. All asynchronous
i/o goes through this queue which preserves the ordering of requests.
A simple mechanism ensures that the iods are shared out fairly between
active mount points. This removes the sysctl variable vfs.nfs.dwrite
since the new queueing mechanism removes the old delayed write code
completely.
This should go into the 2.2 branch.
Diffstat (limited to 'sys/nfsclient/nfs_vfsops.c')
-rw-r--r-- | sys/nfsclient/nfs_vfsops.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index af0b0c6..0e9e1e2 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)nfs_vfsops.c 8.3 (Berkeley) 1/4/94 - * $Id: nfs_vfsops.c,v 1.29 1996/05/02 14:20:40 phk Exp $ + * $Id: nfs_vfsops.c,v 1.30 1996/10/20 15:01:58 phk Exp $ */ #include <sys/param.h> @@ -79,6 +79,10 @@ struct nfsstats nfsstats; SYSCTL_NODE(_vfs, MOUNT_NFS, nfs, CTLFLAG_RW, 0, "NFS filesystem"); SYSCTL_STRUCT(_vfs_nfs, NFS_NFSSTATS, nfsstats, CTLFLAG_RD, &nfsstats, nfsstats, ""); +#ifdef NFS_DEBUG +int nfs_debug; +SYSCTL_INT(_vfs_nfs, OID_AUTO, debug, CTLFLAG_RW, &nfs_debug, 0, ""); +#endif static int nfs_iosize __P((struct nfsmount *nmp)); static int mountnfs __P((struct nfs_args *,struct mount *, @@ -588,6 +592,7 @@ mountnfs(argp, mp, nam, pth, hst, vpp) M_NFSMNT, M_WAITOK); bzero((caddr_t)nmp, sizeof (struct nfsmount)); TAILQ_INIT(&nmp->nm_uidlruhead); + TAILQ_INIT(&nmp->nm_bufq); mp->mnt_data = (qaddr_t)nmp; } getnewfsid(mp, MOUNT_NFS); |