1 There's some really badly broken software out there that is entirely
2 dependant on HZ for its maximum performance. Raise the maximum HZ value
3 to some higher and slightly unreasonable values up to some higher and
4 completely obscene values.
6 Signed-off-by: Con Kolivas <kernel@kolivas.org>
9 arch/x86/kernel/cpu/proc.c | 2 -
10 arch/x86/kernel/smpboot.c | 2 -
11 include/linux/nfsd/stats.h | 4 +-
12 include/net/inet_timewait_sock.h | 10 ++++--
13 init/calibrate.c | 2 -
14 kernel/Kconfig.hz | 64 +++++++++++++++++++++++++++++++++++++++
15 6 files changed, 76 insertions(+), 8 deletions(-)
17 Index: linux-2.6.32-ck1/kernel/Kconfig.hz
18 ===================================================================
19 --- linux-2.6.32-ck1.orig/kernel/Kconfig.hz 2009-12-10 23:00:22.485001550 +1100
20 +++ linux-2.6.32-ck1/kernel/Kconfig.hz 2009-12-10 23:00:38.850376050 +1100
21 @@ -48,6 +48,63 @@ choice
22 can also benefit from this choice without sacrificing battery life
23 if dynticks is also enabled.
28 + 1500 Hz is an insane value to use to run broken software that is Hz
31 + Being over 1000, driver breakage is likely.
36 + 2000 Hz is an insane value to use to run broken software that is Hz
39 + Being over 1000, driver breakage is likely.
44 + 3000 Hz is an insane value to use to run broken software that is Hz
47 + Being over 1000, driver breakage is likely.
52 + 4000 Hz is an insane value to use to run broken software that is Hz
55 + Being over 1000, driver breakage is likely.
60 + 5000 Hz is an obscene value to use to run broken software that is Hz
63 + Being over 1000, driver breakage is likely.
68 + 7500 Hz is an obscene value to use to run broken software that is Hz
71 + Being over 1000, driver breakage is likely.
76 + 10000 Hz is an obscene value to use to run broken software that is Hz
79 + Being over 1000, driver breakage is likely.
85 @@ -56,6 +113,13 @@ config HZ
86 default 250 if HZ_250_NODEFAULT
88 default 1000 if HZ_1000
89 + default 1500 if HZ_1500
90 + default 2000 if HZ_2000
91 + default 3000 if HZ_3000
92 + default 4000 if HZ_4000
93 + default 5000 if HZ_5000
94 + default 7500 if HZ_7500
95 + default 10000 if HZ_10000
98 def_bool HIGH_RES_TIMERS && (!SMP || USE_GENERIC_SMP_HELPERS)
99 Index: linux-2.6.32-ck1/include/net/inet_timewait_sock.h
100 ===================================================================
101 --- linux-2.6.32-ck1.orig/include/net/inet_timewait_sock.h 2009-12-10 20:16:33.291376025 +1100
102 +++ linux-2.6.32-ck1/include/net/inet_timewait_sock.h 2009-12-10 23:00:38.851376102 +1100
103 @@ -39,8 +39,8 @@ struct inet_hashinfo;
104 * If time > 4sec, it is "slow" path, no recycling is required,
105 * so that we select tick to get range about 4 seconds.
107 -#if HZ <= 16 || HZ > 4096
108 -# error Unsupported: HZ <= 16 or HZ > 4096
109 +#if HZ <= 16 || HZ > 16384
110 +# error Unsupported: HZ <= 16 or HZ > 16384
112 # define INET_TWDR_RECYCLE_TICK (5 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
114 @@ -55,8 +55,12 @@ struct inet_hashinfo;
115 # define INET_TWDR_RECYCLE_TICK (10 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
117 # define INET_TWDR_RECYCLE_TICK (11 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
120 # define INET_TWDR_RECYCLE_TICK (12 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
122 +# define INET_TWDR_RECYCLE_TICK (13 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
124 +# define INET_TWDR_RECYCLE_TICK (14 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
127 /* TIME_WAIT reaping mechanism. */
128 Index: linux-2.6.32-ck1/init/calibrate.c
129 ===================================================================
130 --- linux-2.6.32-ck1.orig/init/calibrate.c 2009-12-10 20:16:33.332001658 +1100
131 +++ linux-2.6.32-ck1/init/calibrate.c 2009-12-10 23:00:38.851376102 +1100
132 @@ -172,5 +172,5 @@ void __cpuinit calibrate_delay(void)
134 printk(KERN_CONT "%lu.%02lu BogoMIPS (lpj=%lu)\n",
135 loops_per_jiffy/(500000/HZ),
136 - (loops_per_jiffy/(5000/HZ)) % 100, loops_per_jiffy);
137 + (loops_per_jiffy * 10 /(50000/HZ)) % 100, loops_per_jiffy);
139 Index: linux-2.6.32-ck1/arch/x86/kernel/cpu/proc.c
140 ===================================================================
141 --- linux-2.6.32-ck1.orig/arch/x86/kernel/cpu/proc.c 2009-12-10 20:16:33.301376557 +1100
142 +++ linux-2.6.32-ck1/arch/x86/kernel/cpu/proc.c 2009-12-10 23:00:38.851376102 +1100
143 @@ -109,7 +109,7 @@ static int show_cpuinfo(struct seq_file
145 seq_printf(m, "\nbogomips\t: %lu.%02lu\n",
146 c->loops_per_jiffy/(500000/HZ),
147 - (c->loops_per_jiffy/(5000/HZ)) % 100);
148 + (c->loops_per_jiffy * 10 /(50000/HZ)) % 100);
151 if (c->x86_tlbsize > 0)
152 Index: linux-2.6.32-ck1/arch/x86/kernel/smpboot.c
153 ===================================================================
154 --- linux-2.6.32-ck1.orig/arch/x86/kernel/smpboot.c 2009-12-10 20:16:33.312001306 +1100
155 +++ linux-2.6.32-ck1/arch/x86/kernel/smpboot.c 2009-12-10 23:00:38.852376639 +1100
156 @@ -457,7 +457,7 @@ static void impress_friends(void)
157 "Total of %d processors activated (%lu.%02lu BogoMIPS).\n",
160 - (bogosum/(5000/HZ))%100);
161 + (bogosum * 10/(50000/HZ))%100);
163 pr_debug("Before bogocount - setting activated=1.\n");
165 Index: linux-2.6.32-ck1/include/linux/nfsd/stats.h
166 ===================================================================
167 --- linux-2.6.32-ck1.orig/include/linux/nfsd/stats.h 2009-12-10 20:16:33.281376047 +1100
168 +++ linux-2.6.32-ck1/include/linux/nfsd/stats.h 2009-12-10 23:00:38.853376827 +1100
171 #include <linux/nfs4.h>
173 -/* thread usage wraps very million seconds (approx one fortnight) */
174 -#define NFSD_USAGE_WRAP (HZ*1000000)
175 +/* thread usage wraps every one hundred thousand seconds (approx one day) */
176 +#define NFSD_USAGE_WRAP (HZ*100000)