Skip to content

Commit

Permalink
sched: fix sign check error in place_entity()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Molnar committed Oct 15, 2007
1 parent 94359f0 commit b8487b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b8487b9

Please sign in to comment.