diff options
author | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2008-10-17 13:27:02 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-20 08:05:02 -0400 |
commit | ffda12a17a324103e9900fa1035309811eecbfe5 (patch) | |
tree | 79fe8aae79a41b467f2cdd055036b3017642a9f6 /kernel/sysctl.c | |
parent | b0aa51b999c449e5e3f9faa1ee406e052d407fe7 (diff) |
sched: optimize group load balancer
I noticed that tg_shares_up() unconditionally takes rq-locks for all cpus
in the sched_domain. This hurts.
We need the rq-locks whenever we change the weight of the per-cpu group sched
entities. To allevate this a little, only change the weight when the new
weight is at least shares_thresh away from the old value.
This avoids the rq-lock for the top level entries, since those will never
be re-weighted, and fuzzes the lower level entries a little to gain performance
in semi-stable situations.
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 | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 617d41e4d6a0..3d804f41e649 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
@@ -276,6 +276,16 @@ static struct ctl_table kern_table[] = { | |||
276 | }, | 276 | }, |
277 | { | 277 | { |
278 | .ctl_name = CTL_UNNUMBERED, | 278 | .ctl_name = CTL_UNNUMBERED, |
279 | .procname = "sched_shares_thresh", | ||
280 | .data = &sysctl_sched_shares_thresh, | ||
281 | .maxlen = sizeof(unsigned int), | ||
282 | .mode = 0644, | ||
283 | .proc_handler = &proc_dointvec_minmax, | ||
284 | .strategy = &sysctl_intvec, | ||
285 | .extra1 = &zero, | ||
286 | }, | ||
287 | { | ||
288 | .ctl_name = CTL_UNNUMBERED, | ||
279 | .procname = "sched_child_runs_first", | 289 | .procname = "sched_child_runs_first", |
280 | .data = &sysctl_sched_child_runs_first, | 290 | .data = &sysctl_sched_child_runs_first, |
281 | .maxlen = sizeof(unsigned int), | 291 | .maxlen = sizeof(unsigned int), |