There's some really badly broken software out there that is entirely dependant on HZ for its maximum performance. Raise the maximum HZ value to some higher and slightly unreasonable values up to some higher and completely obscene values. -ck --- --- arch/x86/kernel/cpu/proc.c | 2 - arch/x86/kernel/smpboot.c | 2 - include/linux/nfsd/stats.h | 4 +- include/net/inet_timewait_sock.h | 10 ++++-- init/calibrate.c | 2 - kernel/Kconfig.hz | 64 +++++++++++++++++++++++++++++++++++++++ 6 files changed, 76 insertions(+), 8 deletions(-) Index: linux-3.1-ck2/arch/x86/kernel/cpu/proc.c =================================================================== --- linux-3.1-ck2.orig/arch/x86/kernel/cpu/proc.c 2009-12-03 21:39:58.000000000 +1100 +++ linux-3.1-ck2/arch/x86/kernel/cpu/proc.c 2011-11-11 13:28:23.265507544 +1100 @@ -109,7 +109,7 @@ static int show_cpuinfo(struct seq_file seq_printf(m, "\nbogomips\t: %lu.%02lu\n", c->loops_per_jiffy/(500000/HZ), - (c->loops_per_jiffy/(5000/HZ)) % 100); + (c->loops_per_jiffy * 10 /(50000/HZ)) % 100); #ifdef CONFIG_X86_64 if (c->x86_tlbsize > 0) Index: linux-3.1-ck2/arch/x86/kernel/smpboot.c =================================================================== --- linux-3.1-ck2.orig/arch/x86/kernel/smpboot.c 2011-10-25 21:07:11.000000000 +1100 +++ linux-3.1-ck2/arch/x86/kernel/smpboot.c 2011-11-11 13:28:23.265507544 +1100 @@ -430,7 +430,7 @@ static void impress_friends(void) "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", num_online_cpus(), bogosum/(500000/HZ), - (bogosum/(5000/HZ))%100); + (bogosum * 10/(50000/HZ))%100); pr_debug("Before bogocount - setting activated=1.\n"); } Index: linux-3.1-ck2/include/linux/nfsd/stats.h =================================================================== --- linux-3.1-ck2.orig/include/linux/nfsd/stats.h 2009-06-10 13:05:27.000000000 +1000 +++ linux-3.1-ck2/include/linux/nfsd/stats.h 2011-11-11 13:28:23.265507544 +1100 @@ -11,8 +11,8 @@ #include -/* thread usage wraps very million seconds (approx one fortnight) */ -#define NFSD_USAGE_WRAP (HZ*1000000) +/* thread usage wraps every one hundred thousand seconds (approx one day) */ +#define NFSD_USAGE_WRAP (HZ*100000) #ifdef __KERNEL__ Index: linux-3.1-ck2/include/net/inet_timewait_sock.h =================================================================== --- linux-3.1-ck2.orig/include/net/inet_timewait_sock.h 2011-10-25 21:07:13.000000000 +1100 +++ linux-3.1-ck2/include/net/inet_timewait_sock.h 2011-11-11 13:28:23.266507544 +1100 @@ -39,8 +39,8 @@ struct inet_hashinfo; * If time > 4sec, it is "slow" path, no recycling is required, * so that we select tick to get range about 4 seconds. */ -#if HZ <= 16 || HZ > 4096 -# error Unsupported: HZ <= 16 or HZ > 4096 +#if HZ <= 16 || HZ > 16384 +# error Unsupported: HZ <= 16 or HZ > 16384 #elif HZ <= 32 # define INET_TWDR_RECYCLE_TICK (5 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG) #elif HZ <= 64 @@ -55,8 +55,12 @@ struct inet_hashinfo; # define INET_TWDR_RECYCLE_TICK (10 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG) #elif HZ <= 2048 # define INET_TWDR_RECYCLE_TICK (11 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG) -#else +#elif HZ <= 4096 # define INET_TWDR_RECYCLE_TICK (12 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG) +#elif HZ <= 8192 +# define INET_TWDR_RECYCLE_TICK (13 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG) +#else +# define INET_TWDR_RECYCLE_TICK (14 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG) #endif /* TIME_WAIT reaping mechanism. */ Index: linux-3.1-ck2/init/calibrate.c =================================================================== --- linux-3.1-ck2.orig/init/calibrate.c 2011-10-25 21:07:13.000000000 +1100 +++ linux-3.1-ck2/init/calibrate.c 2011-11-11 13:28:23.266507544 +1100 @@ -278,7 +278,7 @@ void __cpuinit calibrate_delay(void) if (!printed) pr_cont("%lu.%02lu BogoMIPS (lpj=%lu)\n", lpj/(500000/HZ), - (lpj/(5000/HZ)) % 100, lpj); + (lpj * 10 /(50000 / HZ)) % 100, lpj); loops_per_jiffy = lpj; printed = true; Index: linux-3.1-ck2/kernel/Kconfig.hz =================================================================== --- linux-3.1-ck2.orig/kernel/Kconfig.hz 2011-11-11 13:28:23.087507555 +1100 +++ linux-3.1-ck2/kernel/Kconfig.hz 2011-11-11 13:28:23.266507544 +1100 @@ -48,6 +48,63 @@ choice can also benefit from this choice without sacrificing battery life if dynticks is also enabled. + config HZ_1500 + bool "1500 HZ" + help + 1500 Hz is an insane value to use to run broken software that is Hz + limited. + + Being over 1000, driver breakage is likely. + + config HZ_2000 + bool "2000 HZ" + help + 2000 Hz is an insane value to use to run broken software that is Hz + limited. + + Being over 1000, driver breakage is likely. + + config HZ_3000 + bool "3000 HZ" + help + 3000 Hz is an insane value to use to run broken software that is Hz + limited. + + Being over 1000, driver breakage is likely. + + config HZ_4000 + bool "4000 HZ" + help + 4000 Hz is an insane value to use to run broken software that is Hz + limited. + + Being over 1000, driver breakage is likely. + + config HZ_5000 + bool "5000 HZ" + help + 5000 Hz is an obscene value to use to run broken software that is Hz + limited. + + Being over 1000, driver breakage is likely. + + config HZ_7500 + bool "7500 HZ" + help + 7500 Hz is an obscene value to use to run broken software that is Hz + limited. + + Being over 1000, driver breakage is likely. + + config HZ_10000 + bool "10000 HZ" + help + 10000 Hz is an obscene value to use to run broken software that is Hz + limited. + + Being over 1000, driver breakage is likely. + + endchoice config HZ @@ -56,6 +113,13 @@ config HZ default 250 if HZ_250_NODEFAULT default 300 if HZ_300 default 1000 if HZ_1000 + default 1500 if HZ_1500 + default 2000 if HZ_2000 + default 3000 if HZ_3000 + default 4000 if HZ_4000 + default 5000 if HZ_5000 + default 7500 if HZ_7500 + default 10000 if HZ_10000 config SCHED_HRTICK def_bool HIGH_RES_TIMERS && (!SMP || USE_GENERIC_SMP_HELPERS)