From nobody@FreeBSD.org  Thu Jun 14 05:23:17 2007
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id D385816A46E
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 14 Jun 2007 05:23:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [69.147.83.33])
	by mx1.freebsd.org (Postfix) with ESMTP id C387813C4B9
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 14 Jun 2007 05:23:17 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id l5E5NHbx004553
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 14 Jun 2007 05:23:17 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id l5E5NHBu004552;
	Thu, 14 Jun 2007 05:23:17 GMT
	(envelope-from nobody)
Message-Id: <200706140523.l5E5NHBu004552@www.freebsd.org>
Date: Thu, 14 Jun 2007 05:23:17 GMT
From: Ighighi <ighighi@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: wrong advertising of default value for HZ in sys/conf/NOTES
X-Send-Pr-Version: www-3.0

>Number:         113670
>Category:       misc
>Synopsis:       [NOTES] wrong advertising of default value for HZ in sys/conf/NOTES
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    rwatson
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jun 14 05:30:04 GMT 2007
>Closed-Date:    Wed Mar 12 11:40:28 UTC 2008
>Last-Modified:  Wed Mar 12 11:40:28 UTC 2008
>Originator:     Ighighi
>Release:        6.2-STABLE
>Organization:
>Environment:
FreeBSD orion 6.2-STABLE FreeBSD 6.2-STABLE #1: Tue Jun 12 20:39:04 VET 2007     root@orion:/usr/obj/usr/src/sys/CUSTOM  i386
>Description:
The current src/sys/conf/NOTES (v1.1432) states that:

-8<--------------------------------------

# CLOCK OPTIONS

# The granularity of operation is controlled by the kernel option HZ whose
# default value (100) means a granularity of 10ms (1s/HZ).

[...]
options         HZ=100

-8<--------------------------------------

I guess the real value is 10x that quantity for 4 of the "main" platforms,
as defined in src/sys/kern/subr_param.c

-8<--------------------------------------

#ifndef HZ
#  if defined(__amd64__) || defined(__i386__) || defined(__ia64__) || defined(__sparc64__)
#    define     HZ 1000
#  else
#    define     HZ 100
#  endif
#endif

-8<--------------------------------------

By looking at the CVS log available at:
http://www.FreeBSD.org/cgi/cvsweb.cgi/sys/kern/subr_param.c
it can be seen that it has been that way since 6.0-RELEASE, with a just a few
platforms being added earlier, and with no mention of it in their respective
GENERIC files, thus being the "real thing".

I just find it a bit misleading when compiling a new kernel and copy/pasting from NOTES. 
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Bruce Evans <brde@optusnet.com.au>
To: Ighighi <ighighi@gmail.com>
Cc: freebsd-gnats-submit@FreeBSD.org, freebsd-bugs@FreeBSD.org
Subject: Re: kern/113670: wrong advertising of default value for HZ in
 sys/conf/NOTES
Date: Thu, 14 Jun 2007 17:24:52 +1000 (EST)

 On Thu, 14 Jun 2007, Ighighi wrote:
 
 >> Description:
 > The current src/sys/conf/NOTES (v1.1432) states that:
 >
 > -8<--------------------------------------
 >
 > # CLOCK OPTIONS
 >
 > # The granularity of operation is controlled by the kernel option HZ whose
 > # default value (100) means a granularity of 10ms (1s/HZ).
 >
 > [...]
 > options         HZ=100
 
 NOTES (LINT) is supposed to give a non-default value, so that non-default
 values get tested.
 
 So 100 in the above options directive was a bug when the default was
 100 (I used 101 in NOTES then), but is now correct, while the comment that
 gives the default was correct but is now wrong.
 
 Before this, attached to the options directive for DUMMYNET, is a comment
 that suggests using "optionz HZ=1000", but this is the default.  Similarly
 for DEVICE_POLLING in the MD NOTES.
 
 Reasons why HZ shouldn't be set to 1000 are still in the [...] part
 of the above comment.  These reasons still apply, but on fast machines
 the loss is closer to 0.5% than 5% or 50% so most users don't notice.
 
 > -8<--------------------------------------
 >
 > I guess the real value is 10x that quantity for 4 of the "main" platforms,
 > as defined in src/sys/kern/subr_param.c
 >
 > -8<--------------------------------------
 >
 > #ifndef HZ
 > #  if defined(__amd64__) || defined(__i386__) || defined(__ia64__) || defined(__sparc64__)
 > #    define     HZ 1000
 > #  else
 > #    define     HZ 100
 > #  endif
 > #endif
 >
 > -8<--------------------------------------
 >
 > By looking at the CVS log available at:
 > http://www.FreeBSD.org/cgi/cvsweb.cgi/sys/kern/subr_param.c
 > it can be seen that it has been that way since 6.0-RELEASE, with a just a few
 > platforms being added earlier, and with no mention of it in their respective
 > GENERIC files, thus being the "real thing".
 >
 > I just find it a bit misleading when compiling a new kernel and copy/pasting from NOTES.
 
 Don't copy/paste values from NOTES.  This should give bizarre values.
 Copy values from GENERIC and adjust them according to comments in
 NOTES, but beware that NOTES is likely to be out of date and/or not
 cover all machine dependencies.  E.g., strictly, to match the above ifdef,
 it is a bug for the MI NOTES to have any options for HZ.  It just has
 options that are several years out of date for HZ.  More obscure options
 may be more out of date.
 
 Bruce
Responsible-Changed-From-To: freebsd-bugs->rwatson 
Responsible-Changed-By: rwatson 
Responsible-Changed-When: Sun Mar 9 11:24:04 UTC 2008 
Responsible-Changed-Why:  
Take ownership of this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113670 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: misc/113670: commit references a PR
Date: Sun,  9 Mar 2008 11:30:07 +0000 (UTC)

 rwatson     2008-03-09 11:29:59 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/conf             NOTES 
   Log:
   HZ now defaults to 1000 on many architectures, so update NOTES to reflect
   that.
   
   MFC after:      3 days
   PR:             113670
   Submitted by:   Ighighi <ighighi at gmail.com>
   
   Revision  Changes    Path
   1.1475    +9 -9      src/sys/conf/NOTES
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: rwatson 
State-Changed-When: Sun Mar 9 11:40:55 UTC 2008 
State-Changed-Why:  
Transition to patched until MFC'd. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113670 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: misc/113670: commit references a PR
Date: Wed, 12 Mar 2008 11:09:23 +0000 (UTC)

 rwatson     2008-03-12 11:09:16 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_7)
     sys/conf             NOTES 
   Log:
   Merge NOTES:1.1475 from HEAD to RELENG_7:
   
     HZ now defaults to 1000 on many architectures, so update NOTES to reflect
     that.
   
     PR:             113670
     Submitted by:   Ighighi <ighighi at gmail.com>
   
   Revision    Changes    Path
   1.1454.2.1  +9 -9      src/sys/conf/NOTES
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: misc/113670: commit references a PR
Date: Wed, 12 Mar 2008 11:33:13 +0000 (UTC)

 rwatson     2008-03-12 11:33:07 UTC
 
   FreeBSD src repository
 
   Modified files:        (Branch: RELENG_6)
     sys/conf             NOTES 
   Log:
   Merge NOTES:1.1475 from HEAD to RELENG_6:
   
     HZ now defaults to 1000 on many architectures, so update NOTES to reflect
     that.
   
     PR:             113670
     Submitted by:   Ighighi <ighighi at gmail.com>
   
   Revision     Changes    Path
   1.1325.2.39  +9 -9      src/sys/conf/NOTES
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: rwatson 
State-Changed-When: Wed Mar 12 11:40:03 UTC 2008 
State-Changed-Why:  
Patch has now been merged to FreeBSD 7.x and FreeBSD 6.x.  Thanks for the 
submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=113670 
>Unformatted:
