diff options
| author | Ingo Molnar <mingo@elte.hu> | 2007-07-09 12:52:00 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2007-07-09 12:52:00 -0400 |
| commit | 77e54a1f88a1cb0746c7694fa40052bd02df1123 (patch) | |
| tree | fb329ec0f5b8dfadd3148d03598b48a0c543802b /kernel/sysctl.c | |
| parent | 7dd593608df3f9d4e4531cfe29f28c3a3766a0ee (diff) | |
sched: add CFS debug sysctls
add CFS debug sysctls: only tweakable if SCHED_DEBUG is enabled.
This allows for faster debugging of scheduler problems.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sysctl.c')
| -rw-r--r-- | kernel/sysctl.c | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 30ee462ee79..51f5dac42a0 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
| @@ -206,7 +206,87 @@ static ctl_table root_table[] = { | |||
| 206 | { .ctl_name = 0 } | 206 | { .ctl_name = 0 } |
| 207 | }; | 207 | }; |
| 208 | 208 | ||
| 209 | #ifdef CONFIG_SCHED_DEBUG | ||
| 210 | static unsigned long min_sched_granularity_ns = 100000; /* 100 usecs */ | ||
| 211 | static unsigned long max_sched_granularity_ns = 1000000000; /* 1 second */ | ||
| 212 | static unsigned long min_wakeup_granularity_ns; /* 0 usecs */ | ||
| 213 | static unsigned long max_wakeup_granularity_ns = 1000000000; /* 1 second */ | ||
| 214 | #endif | ||
| 215 | |||
| 209 | static ctl_table kern_table[] = { | 216 | static ctl_table kern_table[] = { |
| 217 | #ifdef CONFIG_SCHED_DEBUG | ||
| 218 | { | ||
| 219 | .ctl_name = CTL_UNNUMBERED, | ||
| 220 | .procname = "sched_granularity_ns", | ||
| 221 | .data = &sysctl_sched_granularity, | ||
| 222 | .maxlen = sizeof(unsigned int), | ||
| 223 | .mode = 0644, | ||
| 224 | .proc_handler = &proc_dointvec_minmax, | ||
| 225 | .strategy = &sysctl_intvec, | ||
| 226 | .extra1 = &min_sched_granularity_ns, | ||
| 227 | .extra2 = &max_sched_granularity_ns, | ||
| 228 | }, | ||
| 229 | { | ||
| 230 | .ctl_name = CTL_UNNUMBERED, | ||
| 231 | .procname = "sched_wakeup_granularity_ns", | ||
| 232 | .data = &sysctl_sched_wakeup_granularity, | ||
| 233 | .maxlen = sizeof(unsigned int), | ||
| 234 | .mode = 0644, | ||
| 235 | .proc_handler = &proc_dointvec_minmax, | ||
| 236 | .strategy = &sysctl_intvec, | ||
| 237 | .extra1 = &min_wakeup_granularity_ns, | ||
| 238 | .extra2 = &max_wakeup_granularity_ns, | ||
| 239 | }, | ||
| 240 | { | ||
| 241 | .ctl_name = CTL_UNNUMBERED, | ||
| 242 | .procname = "sched_batch_wakeup_granularity_ns", | ||
| 243 | .data = &sysctl_sched_batch_wakeup_granularity, | ||
| 244 | .maxlen = sizeof(unsigned int), | ||
| 245 | .mode = 0644, | ||
| 246 | .proc_handler = &proc_dointvec_minmax, | ||
| 247 | .strategy = &sysctl_intvec, | ||
| 248 | .extra1 = &min_wakeup_granularity_ns, | ||
| 249 | .extra2 = &max_wakeup_granularity_ns, | ||
| 250 | }, | ||
| 251 | { | ||
| 252 | .ctl_name = CTL_UNNUMBERED, | ||
| 253 | .procname = "sched_stat_granularity_ns", | ||
| 254 | .data = &sysctl_sched_stat_granularity, | ||
| 255 | .maxlen = sizeof(unsigned int), | ||
| 256 | .mode = 0644, | ||
| 257 | .proc_handler = &proc_dointvec_minmax, | ||
| 258 | .strategy = &sysctl_intvec, | ||
| 259 | .extra1 = &min_wakeup_granularity_ns, | ||
| 260 | .extra2 = &max_wakeup_granularity_ns, | ||
| 261 | }, | ||
| 262 | { | ||
| 263 | .ctl_name = CTL_UNNUMBERED, | ||
| 264 | .procname = "sched_runtime_limit_ns", | ||
| 265 | .data = &sysctl_sched_runtime_limit, | ||
| 266 | .maxlen = sizeof(unsigned int), | ||
| 267 | .mode = 0644, | ||
| 268 | .proc_handler = &proc_dointvec_minmax, | ||
| 269 | .strategy = &sysctl_intvec, | ||
| 270 | .extra1 = &min_sched_granularity_ns, | ||
| 271 | .extra2 = &max_sched_granularity_ns, | ||
| 272 | }, | ||
| 273 | { | ||
| 274 | .ctl_name = CTL_UNNUMBERED, | ||
| 275 | .procname = "sched_child_runs_first", | ||
| 276 | .data = &sysctl_sched_child_runs_first, | ||
| 277 | .maxlen = sizeof(unsigned int), | ||
| 278 | .mode = 0644, | ||
| 279 | .proc_handler = &proc_dointvec, | ||
| 280 | }, | ||
| 281 | { | ||
| 282 | .ctl_name = CTL_UNNUMBERED, | ||
| 283 | .procname = "sched_features", | ||
| 284 | .data = &sysctl_sched_features, | ||
| 285 | .maxlen = sizeof(unsigned int), | ||
| 286 | .mode = 0644, | ||
| 287 | .proc_handler = &proc_dointvec, | ||
| 288 | }, | ||
| 289 | #endif | ||
| 210 | { | 290 | { |
| 211 | .ctl_name = KERN_PANIC, | 291 | .ctl_name = KERN_PANIC, |
| 212 | .procname = "panic", | 292 | .procname = "panic", |
