Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys limit the number of namecache entries to numvnodes rathe...
details: https://anonhg.NetBSD.org/src/rev/89c4eb741551
branches: trunk
changeset: 485015:89c4eb741551
user: chs <chs%NetBSD.org@localhost>
date: Sun Apr 16 21:39:57 2000 +0000
description:
limit the number of namecache entries to numvnodes rather than desiredvnodes.
getnewvnode() has been changed to virtually guarantee that we'll have more
vnodes than "desired", so previously there would always be more vnodes
than namecache entries. this fixes PR 9792.
diffstat:
sys/kern/vfs_cache.c | 4 ++--
sys/sys/vnode.h | 3 ++-
2 files changed, 4 insertions(+), 3 deletions(-)
diffs (35 lines):
diff -r 101454b60aac -r 89c4eb741551 sys/kern/vfs_cache.c
--- a/sys/kern/vfs_cache.c Sun Apr 16 21:27:00 2000 +0000
+++ b/sys/kern/vfs_cache.c Sun Apr 16 21:39:57 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vfs_cache.c,v 1.23 2000/03/30 09:27:14 augustss Exp $ */
+/* $NetBSD: vfs_cache.c,v 1.24 2000/04/16 21:39:57 chs Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -336,7 +336,7 @@
/*
* Free the cache slot at head of lru chain.
*/
- if (numcache < desiredvnodes) {
+ if (numcache < numvnodes) {
ncp = pool_get(&namecache_pool, PR_WAITOK);
memset((char *)ncp, 0, sizeof(*ncp));
numcache++;
diff -r 101454b60aac -r 89c4eb741551 sys/sys/vnode.h
--- a/sys/sys/vnode.h Sun Apr 16 21:27:00 2000 +0000
+++ b/sys/sys/vnode.h Sun Apr 16 21:39:57 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vnode.h,v 1.73 2000/04/11 04:37:51 chs Exp $ */
+/* $NetBSD: vnode.h,v 1.74 2000/04/16 21:39:57 chs Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -322,6 +322,7 @@
*/
extern struct vnode *rootvnode; /* root (i.e. "/") vnode */
extern int desiredvnodes; /* number of vnodes desired */
+extern long numvnodes; /* current number of vnodes */
extern time_t syncdelay; /* max time to delay syncing data */
extern time_t filedelay; /* time to delay syncing files */
extern time_t dirdelay; /* time to delay syncing directories */
Home |
Main Index |
Thread Index |
Old Index