From c6689c797daca2e96b0ccaf727e86ebf09e00e37 Mon Sep 17 00:00:00 2001 From: dillon Date: Wed, 5 Jan 2000 05:11:37 +0000 Subject: 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 --- sys/nfsclient/nfs_node.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'sys/nfsclient/nfs_node.c') 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) -- cgit v1.1