The global variable "tickadj" has no users in the kernel anymore and should be eliminated from all code and documentation.
At one time "tickadj" controlled the skew rate for adjtime(2), but it has been unused since the modern timecounting subsystem was imported from FreeBSD circa 2004-2005. FreeBSD noted this vestigiality and removed the variable in 2002: https://cgit.freebsd.org/src/commit/?id=e1d970f1811e5e1e9c912c032acdcec6521b2a6d ok? Index: lib/libc/sys/sysctl.2 =================================================================== RCS file: /cvs/src/lib/libc/sys/sysctl.2,v retrieving revision 1.42 diff -u -p -r1.42 sysctl.2 --- lib/libc/sys/sysctl.2 29 Dec 2020 12:28:23 -0000 1.42 +++ lib/libc/sys/sysctl.2 9 Jan 2021 02:03:11 -0000 @@ -550,9 +550,8 @@ The scheduler exponential decay value. A .Vt struct clockinfo structure is returned. -This structure contains the clock, statistics clock and profiling clock -frequencies, the number of micro-seconds per hz tick, and the clock -skew rate. +This structure contains the hardclock, statistics clock and profiling clock +frequencies, and the number of microseconds per hardclock tick. .It Dv KERN_CONSDEV Pq Va kern.consdev The console device. .It Dv KERN_CPTIME Pq Va kern.cp_time Index: sys/conf/param.c =================================================================== RCS file: /cvs/src/sys/conf/param.c,v retrieving revision 1.45 diff -u -p -r1.45 param.c --- sys/conf/param.c 7 Sep 2019 01:23:23 -0000 1.45 +++ sys/conf/param.c 9 Jan 2021 02:03:11 -0000 @@ -75,7 +75,6 @@ int hz = HZ; int tick = 1000000 / HZ; int tick_nsec = 1000000000 / HZ; -int tickadj = 240000 / (60 * HZ); /* can adjust 240ms in 60s */ int utc_offset = 0; #define NPROCESS (30 + 16 * MAXUSERS) #define NTEXT (80 + NPROCESS / 8) /* actually the object cache */ Index: sys/arch/mips64/mips64/mips64_machdep.c =================================================================== RCS file: /cvs/src/sys/arch/mips64/mips64/mips64_machdep.c,v retrieving revision 1.33 diff -u -p -r1.33 mips64_machdep.c --- sys/arch/mips64/mips64/mips64_machdep.c 11 Jul 2020 15:18:08 -0000 1.33 +++ sys/arch/mips64/mips64/mips64_machdep.c 9 Jan 2021 02:03:11 -0000 @@ -323,14 +323,13 @@ cp0_calibrate(struct cpu_info *ci) * Start the real-time and statistics clocks. */ void -cpu_initclocks() +cpu_initclocks(void) { struct cpu_info *ci = curcpu(); profhz = hz; tick = 1000000 / hz; /* number of micro-seconds between interrupts */ - tickadj = 240000 / (60 * hz); /* can adjust 240ms in 60s */ cp0_calibrate(ci); Index: sys/kern/kern_clock.c =================================================================== RCS file: /cvs/src/sys/kern/kern_clock.c,v retrieving revision 1.101 diff -u -p -r1.101 kern_clock.c --- sys/kern/kern_clock.c 21 Jan 2020 16:16:23 -0000 1.101 +++ sys/kern/kern_clock.c 9 Jan 2021 02:03:11 -0000 @@ -120,10 +120,6 @@ initclocks(void) profhz = i; psratio = profhz / i; - /* For very large HZ, ensure that division by 0 does not occur later */ - if (tickadj == 0) - tickadj = 1; - inittimecounter(); } @@ -421,7 +417,6 @@ sysctl_clockrate(char *where, size_t *si */ memset(&clkinfo, 0, sizeof clkinfo); clkinfo.tick = tick; - clkinfo.tickadj = tickadj; clkinfo.hz = hz; clkinfo.profhz = profhz; clkinfo.stathz = stathz ? stathz : hz; Index: sys/sys/kernel.h =================================================================== RCS file: /cvs/src/sys/sys/kernel.h,v retrieving revision 1.24 diff -u -p -r1.24 kernel.h --- sys/sys/kernel.h 15 Oct 2020 15:36:31 -0000 1.24 +++ sys/sys/kernel.h 9 Jan 2021 02:03:11 -0000 @@ -51,7 +51,6 @@ extern int utc_offset; /* seconds east extern int tick; /* usec per tick (1000000 / hz) */ extern int tick_nsec; /* nsec per tick */ -extern int tickadj; /* "standard" clock skew, us./tick */ extern int ticks; /* # of hardclock ticks */ extern int hz; /* system clock's frequency */ extern int stathz; /* statistics clock's frequency */ Index: sys/sys/time.h =================================================================== RCS file: /cvs/src/sys/sys/time.h,v retrieving revision 1.57 diff -u -p -r1.57 time.h --- sys/sys/time.h 15 Oct 2020 16:31:11 -0000 1.57 +++ sys/sys/time.h 9 Jan 2021 02:03:11 -0000 @@ -157,7 +157,6 @@ struct itimerval { struct clockinfo { int hz; /* clock frequency */ int tick; /* micro-seconds per hz tick */ - int tickadj; /* clock skew rate for adjtime() */ int stathz; /* statistics clock frequency */ int profhz; /* profiling clock frequency */ }; Index: sbin/sysctl/sysctl.c =================================================================== RCS file: /cvs/src/sbin/sysctl/sysctl.c,v retrieving revision 1.254 diff -u -p -r1.254 sysctl.c --- sbin/sysctl/sysctl.c 28 Dec 2020 18:29:44 -0000 1.254 +++ sbin/sysctl/sysctl.c 9 Jan 2021 02:03:12 -0000 @@ -916,8 +916,8 @@ parse(char *string, int flags) if (!nflag) (void)printf("%s%s", string, equ); (void)printf( - "tick = %d, tickadj = %d, hz = %d, profhz = %d, stathz = %d\n", - clkp->tick, clkp->tickadj, clkp->hz, clkp->profhz, clkp->stathz); + "tick = %d, hz = %d, profhz = %d, stathz = %d\n", + clkp->tick, clkp->hz, clkp->profhz, clkp->stathz); return; } if (special & BOOTTIME) {
