Subject: kern/1887: value of tickadj for time keeping
To: None <gnats-bugs@gnats.netbsd.org>
From: John M Vinopal <banshee@gabriella.resort.com>
List: netbsd-bugs
Date: 01/04/1996 15:01:22
>Number:         1887
>Category:       kern
>Synopsis:       tickadj is too big for running xntp
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people (Kernel Bug People)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Jan  4 18:20:07 1996
>Last-Modified:
>Originator:     John M Vinopal
>Organization:
The Wailer at the Gates of Dawn              | banshee@resort.com          |
Just who ARE you calling a FROOFROO Head?    |                             |
DoD#0667  "Just a friend of the beast."      | http://resort.com/~banshee/ |
2,3,5,7,13,17,19,31,61,89,107,127,521,607....|                             |
>Release:        1.1
>Environment:
System: NetBSD gabriella.resort.com 1.1A NetBSD 1.1A (GABRIELLA-NCR) #0: Thu Dec 28 12:27:05 PST 1995 banshee@gabriella.resort.com:/usr/local/NetBSD/src/sys/arch/i386/compile/GABRIELLA-NCR i386


>Description:
	the value of tickadj is too big for running xntp happily.  the value
of 40 is presently used, while the value of 5 is suggested.  it makes sense
to allow the kernel building user to easily change the value of this parameter.
the method I have adopted is "options TICKADJ=5" in the kernel config file.

this may not be the right method for a few reasons:
	1) integration of the PLL (PPL?) code into the kernel may make 
	this obsolete.
	2) should this be modifable as a kernel variable and not lumped
	into kern.clockrate?
	3) was there some technical reason that 40 was a better choice?

>How-To-Repeat:
	/sys/conf/param.c
>Fix:

*** param.old	Thu Jan  4 14:53:14 1996
--- param.c	Thu Dec 28 12:26:28 1995
***************
*** 80,86 ****
--- 80,90 ----
  #endif
  int	hz = HZ;
  int	tick = 1000000 / HZ;
+ #ifdef TICKADJ
+ int	tickadj = TICKADJ;
+ #else
  int	tickadj = 240000 / (60 * HZ);		/* can adjust 240ms in 60s */
+ #endif
  struct	timezone tz = { TIMEZONE, DST };
  #define	NPROC (20 + 16 * MAXUSERS)
  int	maxproc = NPROC;
>Audit-Trail:
>Unformatted: