Hi guys, Mitchell (in CC) suggested that the following patch should be backported to 2.6.32-stable. Since it was merged in 2.6.38-rc2, it would then also probably make sense for 2.6.34-stable.
I personally think it's OK but wanted an approval before including it. Thanks in advance, Willy ---- commit d7d8294415f0ce4254827d4a2a5ee88b00be52a8 Author: Mike Galbraith <[email protected]> Date: Wed Jan 5 05:41:17 2011 +0100 sched: Fix signed unsigned comparison in check_preempt_tick() Signed unsigned comparison may lead to superfluous resched if leftmost is right of the current task, wasting a few cycles, and inadvertently _lengthening_ the current task's slice. Reported-by: Venkatesh Pallipadi <[email protected]> Signed-off-by: Mike Galbraith <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> LKML-Reference: <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c index 414145c..77e9166 100644 --- a/kernel/sched_fair.c +++ b/kernel/sched_fair.c @@ -1062,6 +1062,9 @@ check_preempt_tick(struct cfs_rq *cfs_rq, struct sched_entity *curr) struct sched_entity *se = __pick_next_entity(cfs_rq); s64 delta = curr->vruntime - se->vruntime; + if (delta < 0) + return; + if (delta > ideal_runtime) resched_task(rq_of(cfs_rq)->curr); } -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
