diff options
author | dillon <dillon@FreeBSD.org> | 2000-01-05 05:11:37 +0000 |
---|---|---|
committer | dillon <dillon@FreeBSD.org> | 2000-01-05 05:11:37 +0000 |
commit | c6689c797daca2e96b0ccaf727e86ebf09e00e37 (patch) | |
tree | 5cdfd2f2b906cb0407fd5a329f091623735a9701 /sys/nfsclient/nfs_node.c | |
parent | e112622878175672c0eaa5a87ccdf0e882ccc784 (diff) | |
download | FreeBSD-src-c6689c797daca2e96b0ccaf727e86ebf09e00e37.zip FreeBSD-src-c6689c797daca2e96b0ccaf727e86ebf09e00e37.tar.gz |
Enhance reassignbuf(). When a buffer cannot be time-optimally inserted
into vnode dirtyblkhd we append it to the list instead of prepend it to
the list in order to maintain a 'forward' locality of reference, which
is arguably better then 'reverse'. The original algorithm did things this
way to but at a huge time cost.
Enhance the append interlock for NFS writes to handle intr/soft mounts
better.
Fix the hysteresis for NFS async daemon I/O requests to reduce the
number of unnecessary context switches.
Modify handling of NFS mount options. Any given user option that is
too high now defaults to the kernel maximum for that option rather then
the kernel default for that option.
Reviewed by: Alfred Perlstein <bright@wintelcom.net>
Diffstat (limited to 'sys/nfsclient/nfs_node.c')
-rw-r--r-- | sys/nfsclient/nfs_node.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/nfsclient/nfs_node.c b/sys/nfsclient/nfs_node.c index 89cbdce..1de8739 100644 --- a/sys/nfsclient/nfs_node.c +++ b/sys/nfsclient/nfs_node.c @@ -112,6 +112,18 @@ nfs_nget(mntp, fhp, fhsize, npp) register struct vnode *vp; struct vnode *nvp; int error; + int rsflags; + struct nfsmount *nmp; + + /* + * Calculate nfs mount point and figure out whether the rslock should + * be interruptable or not. + */ + nmp = VFSTONFS(mntp); + if (nmp->nm_flag & NFSMNT_INT) + rsflags = PCATCH; + else + rsflags = 0; retry: nhpp = NFSNOHASH(nfs_hash(fhp, fhsize)); @@ -180,7 +192,7 @@ loop: np->n_fhp = &np->n_fh; bcopy((caddr_t)fhp, (caddr_t)np->n_fhp, fhsize); np->n_fhsize = fhsize; - lockinit(&np->n_rslock, PVFS, "nfrslk", 0, LK_NOPAUSE); + lockinit(&np->n_rslock, PVFS | rsflags, "nfrslk", 0, LK_NOPAUSE); *npp = np; if (nfs_node_hash_lock < 0) |