diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:11 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-10-15 11:00:11 -0400 |
commit | b8487b924177385e3932f846f430b73ce8e69bba (patch) | |
tree | c3686b03306ca0eff6bc0387fefac2c248e337d4 /kernel/sched_fair.c | |
parent | 94359f05cb7e1fed0deccc83ebc30a1175a9ae16 (diff) |
sched: fix sign check error in place_entity()
fix sign check error in place_entity() - we'd get excessive
latencies due to negatives being converted to large u64's.
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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 62a9ee8db13e..2bd9625fa62d 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c | |||
@@ -483,7 +483,7 @@ place_entity(struct cfs_rq *cfs_rq, struct sched_entity *se, int initial) | |||
483 | if (sched_feat(NEW_FAIR_SLEEPERS)) | 483 | if (sched_feat(NEW_FAIR_SLEEPERS)) |
484 | vruntime -= sysctl_sched_latency; | 484 | vruntime -= sysctl_sched_latency; |
485 | 485 | ||
486 | vruntime = max(vruntime, se->vruntime); | 486 | vruntime = max_t(s64, vruntime, se->vruntime); |
487 | } | 487 | } |
488 | 488 | ||
489 | se->vruntime = vruntime; | 489 | se->vruntime = vruntime; |