aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_gsn_edf.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_gsn_edf.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_gsn_edf.c')
-rw-r--r--litmus/sched_gsn_edf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/litmus/sched_gsn_edf.c b/litmus/sched_gsn_edf.c
index 7424c183d8b2..c0c63eba70ce 100644
--- a/litmus/sched_gsn_edf.c
+++ b/litmus/sched_gsn_edf.c
@@ -336,7 +336,7 @@ static noinline void job_completion(struct task_struct *t, int forced)
336 */ 336 */
337static void gsnedf_tick(struct task_struct* t) 337static void gsnedf_tick(struct task_struct* t)
338{ 338{
339 if (is_realtime(t) && budget_exhausted(t)) { 339 if (is_realtime(t) && budget_enforced(t) && budget_exhausted(t)) {
340 if (!is_np(t)) { 340 if (!is_np(t)) {
341 /* np tasks will be preempted when they become 341 /* np tasks will be preempted when they become
342 * preemptable again 342 * preemptable again
@@ -399,7 +399,9 @@ static struct task_struct* gsnedf_schedule(struct task_struct * prev)
399 /* (0) Determine state */ 399 /* (0) Determine state */
400 exists = entry->scheduled != NULL; 400 exists = entry->scheduled != NULL;
401 blocks = exists && !is_running(entry->scheduled); 401 blocks = exists && !is_running(entry->scheduled);
402 out_of_time = exists && budget_exhausted(entry->scheduled); 402 out_of_time = exists &&
403 budget_enforced(entry->scheduled) &&
404 budget_exhausted(entry->scheduled);
403 np = exists && is_np(entry->scheduled); 405 np = exists && is_np(entry->scheduled);
404 sleep = exists && get_rt_flags(entry->scheduled) == RT_F_SLEEP; 406 sleep = exists && get_rt_flags(entry->scheduled) == RT_F_SLEEP;
405 preempt = entry->scheduled != entry->linked; 407 preempt = entry->scheduled != entry->linked;