check_preempt_tick() check vruntime mistake?

From: XingChao Wang
Date: Thu Dec 10 2009 - 23:19:40 EST


Hi Ingo,peter,

When check_preempt_tick() selects next leftmost sched_entity,it
calculates delta vruntime of curr and leftmost entity, then compares
it with ideal_runtime. But ideal_runtime is real-time type, need
convert it to virtual-time ,right?

diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c
index 37087a7..9b903d4 100644
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -840,7 +840,7 @@ 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 > ideal_runtime)
+ if (delta > calc_delta_fair(ideal_runtime, curr))
resched_task(rq_of(cfs_rq)->curr);
}
}

thanks
--wang xingchao
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/