NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/49215: option(4) incorrect information of NVNODE



>Number:         49215
>Category:       kern
>Synopsis:       option(4) incorrect information of NVNODE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 18 18:10:01 +0000 2014
>Originator:     Kamil Rytarowski
>Release:        current
>Organization:
>Environment:
NetBSD compaq 6.99.47 NetBSD 6.99.47 (NO_DRM) #0: Sat Jul 26 11:24:44 CEST 2014 
 root@chieftec:/usr/src/sys/arch/amd64/compile/NO_DRM amd64
>Description:
option(4) says about NVNODE and gives incorrect default value.

     options NVNODE=integer
     This option sets the size of the cache used by the name-to-inode
     translation routines, (a.k.a. the namei() cache, though called by many
     other names in the kernel source).  By default, this cache has NPROC (set
     as 20 + 16 * MAXUSERS) * (80 + NPROC / 8) entries.  A reasonable way to
     derive a value of NVNODE, should you notice a large number of namei cache
     misses with a tool such as systat(1), is to examine your system's current
     computed value with sysctl(8), (which calls this parameter
     "kern.maxvnodes") and to increase this value until either the namei cache
     hit rate improves or it is determined that your system does not benefit
     substantially from an increase in the size of the namei cache.

The current value is defined in <sys/param.h>

#ifndef NPROC
#define NPROC   (20 + 16 * MAXUSERS)
#endif
#ifndef NTEXT
#define NTEXT   (80 + NPROC / 8)                /* actually the object cache */
#endif
#ifndef NVNODE
#define NVNODE  (NPROC + NTEXT + 100)
#define NVNODE_IMPLICIT
#endif

So the right message should look like the version in the attached patch with 
this public-report.

It's worth to change this sentence from 'By default, this cache has' to 'By 
default on the most number of ports, this cache has'.
>How-To-Repeat:
N/A
>Fix:
diff --git a/man/man4/options.4 b/man/man4/options.4
index b96b423..692e307 100644
--- a/man/man4/options.4
+++ b/man/man4/options.4
@@ -977,8 +977,8 @@ routines, (a.k.a. the
 .Fn namei
 cache, though called by many other names in the kernel source).
 By default, this cache has
-.Dv NPROC
-(set as 20 + 16 * MAXUSERS) * (80 + NPROC / 8) entries.
+.Dv (NPROC + NTEXT + 100)
+entires (NPROC set as 20 + 16 * MAXUSERS and NTEXT as 80 + NPROC / 8).
 A reasonable way to derive a value of
 .Dv NVNODE ,
 should you notice a large number of namei cache misses with a tool such as



Home | Main Index | Thread Index | Old Index