lkml.org 
[lkml]   [2008]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[RFC/PATCH 16/17] sched: fair: bound tardiness
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 <a.p.zijlstra@chello.nl>
---
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;
}
--



\
 
 \ /
  Last update: 2008-03-09 18:21    [W:0.082 / U:2.240 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site