CVSROOT: /cvs Module name: src Changes by: chel...@cvs.openbsd.org 2020/10/20 09:59:17
Modified files: sys/arch/alpha/alpha: machdep.c sys/arch/sparc64/sparc64: clock.c sys/arch/sh/sh : clock.c sys/arch/loongson/dev: glx.c Log message: alpha, loongson, sh, sparc64: recompute tick, tick_nsec when hz(9) is reset Normally we set hz(9) at compile-time in sys/conf/param.c to the value of HZ. HZ is one of the fundamental compilation options(4). However, sometimes we need to reset hz(9) at runtime. Whenever we reset hz(9) we need to recompute tick and tick_nsec. Otherwise a variety of "time stuff" in the kernel will not work correctly. For example, most timeouts will expire "too slow" or "too fast". There are a bunch of other places we use tick and tick_nsec that will exhibit similar problems. Test-compiled by deraadt@.