Changes to series and rx51_defconfig file for BFQ
[kernel-bfs] / kernel-bfs-2.6.28 / debian / patches / hz-raise_max.patch
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.
5
6 Signed-off-by: Con Kolivas <kernel@kolivas.org>
7
8 ---
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(-)
16
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.
24  
25 +       config HZ_1500
26 +               bool "1500 HZ"
27 +       help
28 +        1500 Hz is an insane value to use to run broken software that is Hz
29 +        limited.
30 +
31 +        Being over 1000, driver breakage is likely.
32 +
33 +       config HZ_2000
34 +               bool "2000 HZ"
35 +       help
36 +        2000 Hz is an insane value to use to run broken software that is Hz
37 +        limited.
38 +
39 +        Being over 1000, driver breakage is likely.
40 +
41 +       config HZ_3000
42 +               bool "3000 HZ"
43 +       help
44 +        3000 Hz is an insane value to use to run broken software that is Hz
45 +        limited.
46 +
47 +        Being over 1000, driver breakage is likely.
48 +
49 +       config HZ_4000
50 +               bool "4000 HZ"
51 +       help
52 +        4000 Hz is an insane value to use to run broken software that is Hz
53 +        limited.
54 +
55 +        Being over 1000, driver breakage is likely.
56 +
57 +       config HZ_5000
58 +               bool "5000 HZ"
59 +       help
60 +        5000 Hz is an obscene value to use to run broken software that is Hz
61 +        limited.
62 +
63 +        Being over 1000, driver breakage is likely.
64 +
65 +       config HZ_7500
66 +               bool "7500 HZ"
67 +       help
68 +        7500 Hz is an obscene value to use to run broken software that is Hz
69 +        limited.
70 +
71 +        Being over 1000, driver breakage is likely.
72 +
73 +       config HZ_10000
74 +               bool "10000 HZ"
75 +       help
76 +        10000 Hz is an obscene value to use to run broken software that is Hz
77 +        limited.
78 +
79 +        Being over 1000, driver breakage is likely.
80 +
81 +
82  endchoice
83  
84  config HZ
85 @@ -56,6 +113,13 @@ config HZ
86         default 250 if HZ_250_NODEFAULT
87         default 300 if HZ_300
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
96  
97  config SCHED_HRTICK
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.
106   */
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
111  #elif HZ <= 32
112  # define INET_TWDR_RECYCLE_TICK (5 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
113  #elif HZ <= 64
114 @@ -55,8 +55,12 @@ struct inet_hashinfo;
115  # define INET_TWDR_RECYCLE_TICK (10 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
116  #elif HZ <= 2048
117  # define INET_TWDR_RECYCLE_TICK (11 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
118 -#else
119 +#elif HZ <= 4096
120  # define INET_TWDR_RECYCLE_TICK (12 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
121 +#elif HZ <= 8192
122 +# define INET_TWDR_RECYCLE_TICK (13 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
123 +#else
124 +# define INET_TWDR_RECYCLE_TICK (14 + 2 - INET_TWDR_RECYCLE_SLOTS_LOG)
125  #endif
126  
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)
133         }
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);
138  }
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 
144  
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);
149  
150  #ifdef CONFIG_X86_64
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",
158                 num_online_cpus(),
159                 bogosum/(500000/HZ),
160 -               (bogosum/(5000/HZ))%100);
161 +               (bogosum * 10/(50000/HZ))%100);
162  
163         pr_debug("Before bogocount - setting activated=1.\n");
164  }
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
169 @@ -11,8 +11,8 @@
170  
171  #include <linux/nfs4.h>
172  
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)
177  
178  #ifdef __KERNEL__
179  
180