diff options
| author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2007-11-09 16:39:37 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2007-11-09 16:39:37 -0500 |
| commit | b2be5e96dc0b5a179cf4cb98e65cfb605752ca26 (patch) | |
| tree | cf229cf83afc2c30369d1751338886cf8a067b5c /kernel/sysctl.c | |
| parent | 2cb8600e6be4281e381d39e44de4359e46333e23 (diff) | |
sched: reintroduce the sched_min_granularity tunable
we lost the sched_min_granularity tunable to a clever optimization
that uses the sched_latency/min_granularity ratio - but the ratio
is quite unintuitive to users and can also crash the kernel if the
ratio is set to 0. So reintroduce the min_granularity tunable,
while keeping the ratio maintained internally.
no functionality changed.
[ mingo@elte.hu: some fixlets. ]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sysctl.c')
| -rw-r--r-- | kernel/sysctl.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 3b4efbe264..6e3b63c068 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
| @@ -235,11 +235,14 @@ static struct ctl_table kern_table[] = { | |||
| 235 | #ifdef CONFIG_SCHED_DEBUG | 235 | #ifdef CONFIG_SCHED_DEBUG |
| 236 | { | 236 | { |
| 237 | .ctl_name = CTL_UNNUMBERED, | 237 | .ctl_name = CTL_UNNUMBERED, |
| 238 | .procname = "sched_nr_latency", | 238 | .procname = "sched_min_granularity_ns", |
| 239 | .data = &sysctl_sched_nr_latency, | 239 | .data = &sysctl_sched_min_granularity, |
| 240 | .maxlen = sizeof(unsigned int), | 240 | .maxlen = sizeof(unsigned int), |
| 241 | .mode = 0644, | 241 | .mode = 0644, |
| 242 | .proc_handler = &proc_dointvec, | 242 | .proc_handler = &sched_nr_latency_handler, |
| 243 | .strategy = &sysctl_intvec, | ||
| 244 | .extra1 = &min_sched_granularity_ns, | ||
| 245 | .extra2 = &max_sched_granularity_ns, | ||
| 243 | }, | 246 | }, |
| 244 | { | 247 | { |
| 245 | .ctl_name = CTL_UNNUMBERED, | 248 | .ctl_name = CTL_UNNUMBERED, |
| @@ -247,7 +250,7 @@ static struct ctl_table kern_table[] = { | |||
| 247 | .data = &sysctl_sched_latency, | 250 | .data = &sysctl_sched_latency, |
| 248 | .maxlen = sizeof(unsigned int), | 251 | .maxlen = sizeof(unsigned int), |
| 249 | .mode = 0644, | 252 | .mode = 0644, |
| 250 | .proc_handler = &proc_dointvec_minmax, | 253 | .proc_handler = &sched_nr_latency_handler, |
| 251 | .strategy = &sysctl_intvec, | 254 | .strategy = &sysctl_intvec, |
| 252 | .extra1 = &min_sched_granularity_ns, | 255 | .extra1 = &min_sched_granularity_ns, |
| 253 | .extra2 = &max_sched_granularity_ns, | 256 | .extra2 = &max_sched_granularity_ns, |
