Annotation of /trunk/kernel26-alx/patches-2.6.21-r13/0022-2.6.21-hz-raise_max-2.patch
Parent Directory | Revision Log
Revision 445 -
(hide annotations)
(download)
Tue Jan 15 00:44:37 2008 UTC (16 years, 8 months ago) by niro
File size: 8868 byte(s)
Tue Jan 15 00:44:37 2008 UTC (16 years, 8 months ago) by niro
File size: 8868 byte(s)
-added patches for 2.6.21-alx-r13
1 | niro | 445 | 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. | ||
5 | |||
6 | Signed-off-by: Con Kolivas <kernel@kolivas.org> | ||
7 | |||
8 | --- | ||
9 | arch/i386/kernel/cpu/proc.c | 2 - | ||
10 | arch/i386/kernel/smpboot.c | 2 - | ||
11 | arch/x86_64/kernel/setup.c | 2 - | ||
12 | include/linux/jiffies.h | 6 +++ | ||
13 | include/linux/nfsd/stats.h | 4 +- | ||
14 | include/net/inet_timewait_sock.h | 10 ++++-- | ||
15 | include/net/pkt_sched.h | 8 ++++ | ||
16 | init/calibrate.c | 6 +-- | ||
17 | kernel/Kconfig.hz | 64 +++++++++++++++++++++++++++++++++++++++ | ||
18 | 9 files changed, 92 insertions(+), 12 deletions(-) | ||
19 | |||
20 | Index: linux-2.6.21-ck2/include/linux/jiffies.h | ||
21 | =================================================================== | ||
22 | --- linux-2.6.21-ck2.orig/include/linux/jiffies.h 2007-05-14 19:49:18.000000000 +1000 | ||
23 | +++ linux-2.6.21-ck2/include/linux/jiffies.h 2007-05-14 19:49:57.000000000 +1000 | ||
24 | @@ -29,6 +29,12 @@ | ||
25 | # define SHIFT_HZ 9 | ||
26 | #elif HZ >= 768 && HZ < 1536 | ||
27 | # define SHIFT_HZ 10 | ||
28 | +#elif HZ >= 1536 && HZ < 3072 | ||
29 | +# define SHIFT_HZ 11 | ||
30 | +#elif HZ >= 3072 && HZ < 6144 | ||
31 | +# define SHIFT_HZ 12 | ||
32 | +#elif HZ >= 6144 && HZ < 12288 | ||
33 | +# define SHIFT_HZ 13 | ||
34 | #else | ||
35 | # error You lose. | ||
36 | #endif | ||
37 | Index: linux-2.6.21-ck2/kernel/Kconfig.hz | ||
38 | =================================================================== | ||
39 | --- linux-2.6.21-ck2.orig/kernel/Kconfig.hz 2007-05-14 19:49:57.000000000 +1000 | ||
40 | +++ linux-2.6.21-ck2/kernel/Kconfig.hz 2007-05-14 19:49:57.000000000 +1000 | ||
41 | @@ -45,6 +45,63 @@ choice | ||
42 | 1000 Hz is the preferred choice for desktop systems and other | ||
43 | systems requiring fast interactive responses to events. | ||
44 | |||
45 | + config HZ_1500 | ||
46 | + bool "1500 HZ" | ||
47 | + help | ||
48 | + 1500 Hz is an insane value to use to run broken software that is Hz | ||
49 | + limited. | ||
50 | + | ||
51 | + Being over 1000, driver breakage is likely. | ||
52 | + | ||
53 | + config HZ_2000 | ||
54 | + bool "2000 HZ" | ||
55 | + help | ||
56 | + 2000 Hz is an insane value to use to run broken software that is Hz | ||
57 | + limited. | ||
58 | + | ||
59 | + Being over 1000, driver breakage is likely. | ||
60 | + | ||
61 | + config HZ_3000 | ||
62 | + bool "3000 HZ" | ||
63 | + help | ||
64 | + 3000 Hz is an insane value to use to run broken software that is Hz | ||
65 | + limited. | ||
66 | + | ||
67 | + Being over 1000, driver breakage is likely. | ||
68 | + | ||
69 | + config HZ_4000 | ||
70 | + bool "4000 HZ" | ||
71 | + help | ||
72 | + 4000 Hz is an insane value to use to run broken software that is Hz | ||
73 | + limited. | ||
74 | + | ||
75 | + Being over 1000, driver breakage is likely. | ||
76 | + | ||
77 | + config HZ_5000 | ||
78 | + bool "5000 HZ" | ||
79 | + help | ||
80 | + 5000 Hz is an obscene value to use to run broken software that is Hz | ||
81 | + limited. | ||
82 | + | ||
83 | + Being over 1000, driver breakage is likely. | ||
84 | + | ||
85 | + config HZ_7500 | ||
86 | + bool "7500 HZ" | ||
87 | + help | ||
88 | + 7500 Hz is an obscene value to use to run broken software that is Hz | ||
89 | + limited. | ||
90 | + | ||
91 | + Being over 1000, driver breakage is likely. | ||
92 | + | ||
93 | + config HZ_10000 | ||
94 | + bool "10000 HZ" | ||
95 | + help | ||
96 | + 10000 Hz is an obscene value to use to run broken software that is Hz | ||
97 | + limited. | ||
98 | + | ||
99 | + Being over 1000, driver breakage is likely. | ||
100 | + | ||
101 | + | ||
102 | endchoice | ||
103 | |||
104 | config HZ | ||
105 | @@ -53,4 +110,11 @@ config HZ | ||
106 | default 250 if HZ_250_NODEFAULT | ||
107 | default 300 if HZ_300 | ||
108 | default 1000 if HZ_1000 | ||
109 | + default 1500 if HZ_1500 | ||
110 | + default 2000 if HZ_2000 | ||
111 | + default 3000 if HZ_3000 | ||
112 | + default 4000 if HZ_4000 | ||
113 | + default 5000 if HZ_5000 | ||
114 | + default 7500 if HZ_7500 | ||
115 | + default 10000 if HZ_10000 | ||
116 | |||
117 | Index: linux-2.6.21-ck2/include/net/inet_timewait_sock.h | ||
118 | =================================================================== | ||
119 | --- linux-2.6.21-ck2.orig/include/net/inet_timewait_sock.h 2007-05-14 19:49:18.000000000 +1000 | ||
120 | +++ linux-2.6.21-ck2/include/net/inet_timewait_sock.h 2007-05-14 19:49:57.000000000 +1000 | ||
121 | @@ -38,8 +38,8 @@ struct inet_hashinfo; | ||
122 | * If time > 4sec, it is "slow" path, no recycling is required, | ||
123 | * so that we select tick to get range about 4 seconds. | ||
124 | */ | ||
125 | -#if HZ <= 16 || HZ > 4096 | ||
126 | -# error Unsupported: HZ <= 16 or HZ > 4096 | ||
127 | +#if HZ <= 16 || HZ > 16384 | ||
128 | +# error Unsupported: HZ <= 16 or HZ > 16384 | ||
129 | #elif HZ <= 32 | ||
130 | # define INET_TWDR_RECYCLE_TICK (5 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG) | ||
131 | #elif HZ <= 64 | ||
132 | @@ -54,8 +54,12 @@ struct inet_hashinfo; | ||
133 | # define INET_TWDR_RECYCLE_TICK (10 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG) | ||
134 | #elif HZ <= 2048 | ||
135 | # define INET_TWDR_RECYCLE_TICK (11 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG) | ||
136 | -#else | ||
137 | +#elif HZ <= 4096 | ||
138 | # define INET_TWDR_RECYCLE_TICK (12 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG) | ||
139 | +#elif HZ <= 8192 | ||
140 | +# define INET_TWDR_RECYCLE_TICK (13 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG) | ||
141 | +#else | ||
142 | +# define INET_TWDR_RECYCLE_TICK (14 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG) | ||
143 | #endif | ||
144 | |||
145 | /* TIME_WAIT reaping mechanism. */ | ||
146 | Index: linux-2.6.21-ck2/include/net/pkt_sched.h | ||
147 | =================================================================== | ||
148 | --- linux-2.6.21-ck2.orig/include/net/pkt_sched.h 2007-05-14 19:49:18.000000000 +1000 | ||
149 | +++ linux-2.6.21-ck2/include/net/pkt_sched.h 2007-05-14 19:49:57.000000000 +1000 | ||
150 | @@ -78,8 +78,14 @@ typedef long psched_tdiff_t; | ||
151 | #define PSCHED_JSCALE 12 | ||
152 | #elif HZ >= 384 && HZ < 768 | ||
153 | #define PSCHED_JSCALE 11 | ||
154 | -#elif HZ >= 768 | ||
155 | +#elif HZ >= 768 && HZ < 1536 | ||
156 | #define PSCHED_JSCALE 10 | ||
157 | +#elif HZ >= 1536 && HZ < 3072 | ||
158 | +#define PSCHED_JSCALE 9 | ||
159 | +#elif HZ >= 3072 && HZ < 6144 | ||
160 | +#define PSCHED_JSCALE 8 | ||
161 | +#else | ||
162 | +#define PSCHED_JSCALE 7 | ||
163 | #endif | ||
164 | |||
165 | #define PSCHED_GET_TIME(stamp) ((stamp) = (get_jiffies_64()<<PSCHED_JSCALE)) | ||
166 | Index: linux-2.6.21-ck2/init/calibrate.c | ||
167 | =================================================================== | ||
168 | --- linux-2.6.21-ck2.orig/init/calibrate.c 2007-05-14 19:49:18.000000000 +1000 | ||
169 | +++ linux-2.6.21-ck2/init/calibrate.c 2007-05-14 19:49:57.000000000 +1000 | ||
170 | @@ -122,12 +122,12 @@ void __devinit calibrate_delay(void) | ||
171 | printk("Calibrating delay loop (skipped)... " | ||
172 | "%lu.%02lu BogoMIPS preset\n", | ||
173 | loops_per_jiffy/(500000/HZ), | ||
174 | - (loops_per_jiffy/(5000/HZ)) % 100); | ||
175 | + (loops_per_jiffy * 10/(50000/HZ)) % 100); | ||
176 | } else if ((loops_per_jiffy = calibrate_delay_direct()) != 0) { | ||
177 | printk("Calibrating delay using timer specific routine.. "); | ||
178 | printk("%lu.%02lu BogoMIPS (lpj=%lu)\n", | ||
179 | loops_per_jiffy/(500000/HZ), | ||
180 | - (loops_per_jiffy/(5000/HZ)) % 100, | ||
181 | + (loops_per_jiffy * 10/(50000/HZ)) % 100, | ||
182 | loops_per_jiffy); | ||
183 | } else { | ||
184 | loops_per_jiffy = (1<<12); | ||
185 | @@ -166,7 +166,7 @@ void __devinit calibrate_delay(void) | ||
186 | /* Round the value and print it */ | ||
187 | printk("%lu.%02lu BogoMIPS (lpj=%lu)\n", | ||
188 | loops_per_jiffy/(500000/HZ), | ||
189 | - (loops_per_jiffy/(5000/HZ)) % 100, | ||
190 | + (loops_per_jiffy * 10/(50000/HZ)) % 100, | ||
191 | loops_per_jiffy); | ||
192 | } | ||
193 | |||
194 | Index: linux-2.6.21-ck2/arch/i386/kernel/cpu/proc.c | ||
195 | =================================================================== | ||
196 | --- linux-2.6.21-ck2.orig/arch/i386/kernel/cpu/proc.c 2007-05-14 19:49:18.000000000 +1000 | ||
197 | +++ linux-2.6.21-ck2/arch/i386/kernel/cpu/proc.c 2007-05-14 19:49:57.000000000 +1000 | ||
198 | @@ -158,7 +158,7 @@ static int show_cpuinfo(struct seq_file | ||
199 | |||
200 | seq_printf(m, "\nbogomips\t: %lu.%02lu\n", | ||
201 | c->loops_per_jiffy/(500000/HZ), | ||
202 | - (c->loops_per_jiffy/(5000/HZ)) % 100); | ||
203 | + (c->loops_per_jiffy * 10/(50000/HZ)) % 100); | ||
204 | seq_printf(m, "clflush size\t: %u\n\n", c->x86_clflush_size); | ||
205 | |||
206 | return 0; | ||
207 | Index: linux-2.6.21-ck2/arch/i386/kernel/smpboot.c | ||
208 | =================================================================== | ||
209 | --- linux-2.6.21-ck2.orig/arch/i386/kernel/smpboot.c 2007-05-14 19:49:18.000000000 +1000 | ||
210 | +++ linux-2.6.21-ck2/arch/i386/kernel/smpboot.c 2007-05-14 19:49:57.000000000 +1000 | ||
211 | @@ -1134,7 +1134,7 @@ static void __init smp_boot_cpus(unsigne | ||
212 | "Total of %d processors activated (%lu.%02lu BogoMIPS).\n", | ||
213 | cpucount+1, | ||
214 | bogosum/(500000/HZ), | ||
215 | - (bogosum/(5000/HZ))%100); | ||
216 | + (bogosum * 10/(50000/HZ))%100); | ||
217 | |||
218 | Dprintk("Before bogocount - setting activated=1.\n"); | ||
219 | |||
220 | Index: linux-2.6.21-ck2/include/linux/nfsd/stats.h | ||
221 | =================================================================== | ||
222 | --- linux-2.6.21-ck2.orig/include/linux/nfsd/stats.h 2007-05-14 19:49:18.000000000 +1000 | ||
223 | +++ linux-2.6.21-ck2/include/linux/nfsd/stats.h 2007-05-14 19:49:57.000000000 +1000 | ||
224 | @@ -35,8 +35,8 @@ struct nfsd_stats { | ||
225 | |||
226 | }; | ||
227 | |||
228 | -/* thread usage wraps very million seconds (approx one fortnight) */ | ||
229 | -#define NFSD_USAGE_WRAP (HZ*1000000) | ||
230 | +/* thread usage wraps every one hundred thousand seconds (approx one day) */ | ||
231 | +#define NFSD_USAGE_WRAP (HZ*100000) | ||
232 | |||
233 | #ifdef __KERNEL__ | ||
234 | |||
235 | Index: linux-2.6.21-ck2/arch/x86_64/kernel/setup.c | ||
236 | =================================================================== | ||
237 | --- linux-2.6.21-ck2.orig/arch/x86_64/kernel/setup.c 2007-05-14 19:49:18.000000000 +1000 | ||
238 | +++ linux-2.6.21-ck2/arch/x86_64/kernel/setup.c 2007-05-14 19:49:57.000000000 +1000 | ||
239 | @@ -1053,7 +1053,7 @@ static int show_cpuinfo(struct seq_file | ||
240 | |||
241 | seq_printf(m, "\nbogomips\t: %lu.%02lu\n", | ||
242 | c->loops_per_jiffy/(500000/HZ), | ||
243 | - (c->loops_per_jiffy/(5000/HZ)) % 100); | ||
244 | + (c->loops_per_jiffy * 10/(50000/HZ)) % 100); | ||
245 | |||
246 | if (c->x86_tlbsize > 0) | ||
247 | seq_printf(m, "TLB size\t: %d 4K pages\n", c->x86_tlbsize); |