EEVDF guarantees a O(1) tardiness exceeding the deadline, this tardines comes from the slice length. So by limiting the slice length when there is competition, we limit the amount by which the deadline can be exceeded. Signed-off-by: Peter Zijlstra --- kernel/sched_fair.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) Index: linux-2.6-2/kernel/sched_fair.c =================================================================== --- linux-2.6-2.orig/kernel/sched_fair.c +++ linux-2.6-2/kernel/sched_fair.c @@ -584,15 +584,21 @@ static u64 sched_slice(struct cfs_rq *cf { u64 slice = __sched_period(cfs_rq->nr_running); - /* - * FIXME: curious 'hack' to make it boot - when the tick is started we - * hit this with the init_task, which is not actually enqueued. - */ if (unlikely(rq_of(cfs_rq)->load.weight <= se->load.weight)) goto out; slice = calc_delta_weight(slice, se); +#ifdef CONFIG_FAIR_GROUP_SCHED + /* + * EEVDF guarantees a O(1) tardiness exceeding the deadline, this + * tardines comes from the slice length. So by limiting the slice + * length when there is competition, we limit the amount by which the + * deadline can be exceeded. + */ + if (rq_of(cfs_rq)->cfs_root.nr_queued) + slice = min_t(u64, slice, sysctl_sched_min_granularity); +#endif out: return slice; } -- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/