Skip to contentSkip to conversation

setting CONFIG_HZ=2000 screws up ntpd

PATCH Hai Zaar 1 participant 1 message Feb 12, 2006

lore
Share & tools
lore

Hai Zaar

author
#0 lore raw

Dear list,
I use attached patch to speed up HZ from 1000 to 2000. I use this hack starting from kernel 2.6.7 and I have not experienced any particular problems. Recently I've started to use NTP and have noticed that ntp client loose synchronization, if this patch is applied, i.e. it connects, synchronizes, and then after a few polls, jitter just jumps to 5 digit number. I've rechecked the behavior on the kernel 2.6.11 and results are the same - applied patch just "skews up" ntpd, while there are no any problems with vanilla kernels.

Is the patch incorrect in any way?

--
Zaar

The patch ajusts kernel internal clock timer to 2000HZ instead of 1000HZ. This is required to decrease response time of some drivers (currently rocket.ko).

Author: Igor Yanover <[email protected]>
Crafted for 2.6.15 by: Michael Goldman <[email protected]>

include/linux/jiffies.h renamed from include/linux/jiffies.h.orig +2 -0
@@ -38,6 +38,8 @@
 # define SHIFT_HZ	9
 #elif HZ >= 768 && HZ < 1536
 # define SHIFT_HZ	10
+#elif HZ >= 1536 && HZ < 3072
+# define SHIFT_HZ  11
 #else
 # error You lose.
 #endif
kernel/Kconfig.hz renamed from kernel/Kconfig.hz.orig +6 -0
@@ -36,6 +36,11 @@
 	 1000 HZ is the preferred choice for desktop systems and other
 	 systems requiring fast interactive responses to events.
 
+	config HZ_2000
+		bool "2000 HZ"
+	help
+	 2000 HZ is hand crafted for software realtime. Use on your own risk.
+
 endchoice
 
 config HZ
@@ -43,4 +48,5 @@
 	default 100 if HZ_100
 	default 250 if HZ_250
 	default 1000 if HZ_1000
+	default 2000 if HZ_2000