aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_cedf.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@koruna.cs.unc.edu>2010-05-20 14:33:27 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 11:27:34 -0400
commit6f89d4f31485546674187cf3b4d472f230b263d0 (patch)
treea9417ea7121e19228870b1e42b323f3bc149af2e /litmus/sched_cedf.c
parent521422c4ef2c64731f709030915a7b301709f4b4 (diff)
Added support for choices in budget policy enforcement.
NO_ENFORCEMENT - A job may execute beyond its declared execution time. Jobs notify the kernel that they are complete via liblitmus's sleep_next_period() QUANTUM_ENFORCEMENT - The kernel terminates a job if its actual execution time exceeds the declared execution time. PRECISE_ENFORCEMENT - Hook declared, but not yet implemented. Plan to support this policy through hrtimers. Error thrown if specified.
Diffstat (limited to 'litmus/sched_cedf.c')
-rw-r--r--litmus/sched_cedf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/litmus/sched_cedf.c b/litmus/sched_cedf.c
index 118fbd14fe25..82c9682eefbd 100644
--- a/litmus/sched_cedf.c
+++ b/litmus/sched_cedf.c
@@ -321,7 +321,7 @@ static noinline void job_completion(struct task_struct *t, int forced)
321 */ 321 */
322static void cedf_tick(struct task_struct* t) 322static void cedf_tick(struct task_struct* t)
323{ 323{
324 if (is_realtime(t) && budget_exhausted(t)) { 324 if (is_realtime(t) && budget_enforced(t) && budget_exhausted(t)) {
325 if (!is_np(t)) { 325 if (!is_np(t)) {
326 /* np tasks will be preempted when they become 326 /* np tasks will be preempted when they become
327 * preemptable again 327 * preemptable again
@@ -379,7 +379,9 @@ static struct task_struct* cedf_schedule(struct task_struct * prev)
379 /* (0) Determine state */ 379 /* (0) Determine state */
380 exists = entry->scheduled != NULL; 380 exists = entry->scheduled != NULL;
381 blocks = exists && !is_running(entry->scheduled); 381 blocks = exists && !is_running(entry->scheduled);
382 out_of_time = exists && budget_exhausted(entry->scheduled); 382 out_of_time = exists &&
383 budget_enforced(entry->scheduled) &&
384 budget_exhausted(entry->scheduled);
383 np = exists && is_np(entry->scheduled); 385 np = exists && is_np(entry->scheduled);
384 sleep = exists && get_rt_flags(entry->scheduled) == RT_F_SLEEP; 386 sleep = exists && get_rt_flags(entry->scheduled) == RT_F_SLEEP;
385 preempt = entry->scheduled != entry->linked; 387 preempt = entry->scheduled != entry->linked;