summaryrefslogtreecommitdiff
path: root/kernel/sched_fair.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-10-15 17:00:11 +0200
committerIngo Molnar <mingo@elte.hu>2007-10-15 17:00:11 +0200
commitb8487b924177385e3932f846f430b73ce8e69bba (patch)
treec3686b03306ca0eff6bc0387fefac2c248e337d4 /kernel/sched_fair.c
parent94359f05cb7e1fed0deccc83ebc30a1175a9ae16 (diff)
downloadlwn-b8487b924177385e3932f846f430b73ce8e69bba.tar.gz
lwn-b8487b924177385e3932f846f430b73ce8e69bba.zip
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.c2
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)
if (sched_feat(NEW_FAIR_SLEEPERS))
vruntime -= sysctl_sched_latency;
- vruntime = max(vruntime, se->vruntime);
+ vruntime = max_t(s64, vruntime, se->vruntime);
}
se->vruntime = vruntime;