aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sysctl.c
diff options
context:
space:
mode:
authorPeter Zijlstra <a.p.zijlstra@chello.nl>2007-08-25 12:41:53 -0400
committerIngo Molnar <mingo@elte.hu>2007-08-25 12:41:53 -0400
commit218050855ece4e923106ab614ac65afa0f618df3 (patch)
treef7b1234ce9e8ad0bc5d5af949949251240ec6a2c /kernel/sysctl.c
parent1fc84aaae3bae9646dd4c7798b8c0ff934338909 (diff)
sched: adaptive scheduler granularity
Instead of specifying the preemption granularity, specify the wanted latency. By fixing the granlarity to a constany the wakeup latency it a function of the number of running tasks on the rq. Invert this relation. sysctl_sched_granularity becomes a minimum for the dynamic granularity computed from the new sysctl_sched_latency. Then use this latency to do more intelligent granularity decisions: if there are fewer tasks running then we can schedule coarser. This helps performance while still always keeping the latency target. 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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index ea90ef51085c..9e3d2960faf5 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -233,6 +233,17 @@ static ctl_table kern_table[] = {
233 }, 233 },
234 { 234 {
235 .ctl_name = CTL_UNNUMBERED, 235 .ctl_name = CTL_UNNUMBERED,
236 .procname = "sched_latency_ns",
237 .data = &sysctl_sched_latency,
238 .maxlen = sizeof(unsigned int),
239 .mode = 0644,
240 .proc_handler = &proc_dointvec_minmax,
241 .strategy = &sysctl_intvec,
242 .extra1 = &min_sched_granularity_ns,
243 .extra2 = &max_sched_granularity_ns,
244 },
245 {
246 .ctl_name = CTL_UNNUMBERED,
236 .procname = "sched_wakeup_granularity_ns", 247 .procname = "sched_wakeup_granularity_ns",
237 .data = &sysctl_sched_wakeup_granularity, 248 .data = &sysctl_sched_wakeup_granularity,
238 .maxlen = sizeof(unsigned int), 249 .maxlen = sizeof(unsigned int),