summaryrefslogtreecommitdiffstats
path: root/sys/nfsclient/nfsnode.h
diff options
context:
space:
mode:
authormsmith <msmith@FreeBSD.org>1998-11-15 20:36:18 +0000
committermsmith <msmith@FreeBSD.org>1998-11-15 20:36:18 +0000
commit6461f7d9c17330833044ded41bfae16576aa6a66 (patch)
tree37017e573ad30479b48a32560dcee9ead3720acb /sys/nfsclient/nfsnode.h
parentc6f6e597c12e532454e186ccbab2cfb6e8aa240f (diff)
downloadFreeBSD-src-6461f7d9c17330833044ded41bfae16576aa6a66.zip
FreeBSD-src-6461f7d9c17330833044ded41bfae16576aa6a66.tar.gz
Reimplement the NFS ACCESS RPC cache as an "accelerator" rather than a true
cache. If the cached result lets us say "yes", then go with that. If we're not sure, or we think the answer might be "no", go to the wire to be certain. This avoids all of the possible false veto cases, and allows us to key the cached value with just the UID for which the cached value holds, reducing the bloat of the nfsnode structure from 104 bytes to just 12 bytes. Since the "yes" case is by far the most common, this should still provide a substantial performance improvement. Also default the cache to on, with a conservative timeout (2 seconds). This improves performance if NFS is loaded as a KLD module, as there's not (yet) code to parse an option out of the module arguments to set it, and sysctl doesn't work (yet) for OIDs in modules. The 'accelerator' mode was suggested by Bjoern Groenvall (bg@sics.se) Feedback on this would be appreciated as testing has been necessarily limited by Comdex, and it would be valuable to have this in 2.2.8.
Diffstat (limited to 'sys/nfsclient/nfsnode.h')
-rw-r--r--sys/nfsclient/nfsnode.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/nfsclient/nfsnode.h b/sys/nfsclient/nfsnode.h
index b242216..49adeb2 100644
--- a/sys/nfsclient/nfsnode.h
+++ b/sys/nfsclient/nfsnode.h
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* @(#)nfsnode.h 8.9 (Berkeley) 5/14/95
- * $Id: nfsnode.h,v 1.26 1998/05/31 18:32:23 peter Exp $
+ * $Id: nfsnode.h,v 1.27 1998/11/13 02:39:09 msmith Exp $
*/
@@ -94,7 +94,7 @@ struct nfsnode {
struct vattr n_vattr; /* Vnode attribute cache */
time_t n_attrstamp; /* Attr. cache timestamp */
u_int32_t n_mode; /* ACCESS mode cache */
- struct ucred n_modecred; /* credentials having mode */
+ uid_t n_modeuid; /* credentials having mode */
time_t n_modestamp; /* mode cache timestamp */
time_t n_mtime; /* Prev modify time. */
time_t n_ctime; /* Prev create time. */
OpenPOWER on IntegriCloud