NetBSD Problem Report #49215

From www@NetBSD.org  Thu Sep 18 18:07:38 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 239F5CE7E4
	for <gnats-bugs@gnats.NetBSD.org>; Thu, 18 Sep 2014 18:07:38 +0000 (UTC)
Message-Id: <20140918180736.E9809CE7E5@mollari.NetBSD.org>
Date: Thu, 18 Sep 2014 18:07:36 +0000 (UTC)
From: n54@gmx.com
Reply-To: n54@gmx.com
To: gnats-bugs@NetBSD.org
Subject: option(4) incorrect information of NVNODE
X-Send-Pr-Version: www-1.0

>Number:         49215
>Category:       kern
>Synopsis:       option(4) incorrect information of NVNODE
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    christos
>State:          closed
>Class:          doc-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 18 18:10:01 +0000 2014
>Closed-Date:    Sat Dec 27 01:42:03 +0000 2014
>Last-Modified:  Sat Dec 27 01:42:03 +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

>Release-Note:

>Audit-Trail:
From: "Kamil Rytarowski" <n54@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/49215
Date: Fri, 26 Dec 2014 01:46:03 +0100

 ping!

From: "Christos Zoulas" <christos@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/49215 CVS commit: src/share/man/man4
Date: Thu, 25 Dec 2014 20:19:43 -0500

 Module Name:	src
 Committed By:	christos
 Date:		Fri Dec 26 01:19:43 UTC 2014

 Modified Files:
 	src/share/man/man4: options.4

 Log Message:
 PR/49215: Kamil Rytarowski: Sync NVNODE with reality.


 To generate a diff of this commit:
 cvs rdiff -u -r1.442 -r1.443 src/share/man/man4/options.4

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Kamil Rytarowski" <n54@gmx.com>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: PR/49215 CVS commit: src/share/man/man4
Date: Fri, 26 Dec 2014 04:49:44 +0100

 Thanks!

 PR can be closed as resolved.

Responsible-Changed-From-To: kern-bug-people->christos
Responsible-Changed-By: jnemeth@NetBSD.org
Responsible-Changed-When: Sat, 27 Dec 2014 01:42:03 +0000
Responsible-Changed-Why:
christos commited the fix.


State-Changed-From-To: open->closed
State-Changed-By: jnemeth@NetBSD.org
State-Changed-When: Sat, 27 Dec 2014 01:42:03 +0000
State-Changed-Why:
Submitter confirms fixed.  Thanks for the PR!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.