diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-03-14 17:16:08 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-03-14 22:02:50 -0400 |
commit | e22ecef1d2658ba54ed7d3fdb5d60829fb434c23 (patch) | |
tree | 49069e160107578ec8212d969b599e03d7a62fae /kernel/sched_fair.c | |
parent | aa2ac25229cd4d0280f6174c42712744ad61b140 (diff) |
sched: fix fair sleepers
Fair sleepers need to scale their latency target down by runqueue
weight. Otherwise busy systems will gain ever larger sleep bonus.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Diffstat (limited to 'kernel/sched_fair.c')
-rw-r--r-- | kernel/sched_fair.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 31c4a2988b64..31aa1b9fa762 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -528,8 +528,10 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) | |||
528 | 528 | ||
529 | if (!initial) { | 529 | if (!initial) { |
530 | /* sleeps upto a single latency don't count. */ | 530 | /* sleeps upto a single latency don't count. */ |
531 | if (sched_feat(NEW_FAIR_SLEEPERS)) | 531 | if (sched_feat(NEW_FAIR_SLEEPERS)) { |
532 | vruntime -= sysctl_sched_latency; | 532 | vruntime -= calc_delta_fair(sysctl_sched_latency, |
533 | &cfs_rq->load); | ||
534 | } | ||
533 | 535 | ||
534 | /* ensure we never gain time by being placed backwards. */ | 536 | /* ensure we never gain time by being placed backwards. */ |
535 | vruntime = max_vruntime(se->vruntime, vruntime); | 537 | vruntime = max_vruntime(se->vruntime, vruntime); |