aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_psn_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_psn_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_psn_edf.c')
-rw-r--r--litmus/sched_psn_edf.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/litmus/sched_psn_edf.c b/litmus/sched_psn_edf.c
index 7a548bf5162e..e50b27391d21 100644
--- a/litmus/sched_psn_edf.c
+++ b/litmus/sched_psn_edf.c
@@ -107,7 +107,7 @@ static void psnedf_tick(struct task_struct *t)
107 */ 107 */
108 BUG_ON(is_realtime(t) && t != pedf->scheduled); 108 BUG_ON(is_realtime(t) && t != pedf->scheduled);
109 109
110 if (is_realtime(t) && budget_exhausted(t)) { 110 if (is_realtime(t) && budget_enforced(t) && budget_exhausted(t)) {
111 if (!is_np(t)) { 111 if (!is_np(t)) {
112 set_tsk_need_resched(t); 112 set_tsk_need_resched(t);
113 TRACE("psnedf_scheduler_tick: " 113 TRACE("psnedf_scheduler_tick: "
@@ -143,7 +143,9 @@ static struct task_struct* psnedf_schedule(struct task_struct * prev)
143 /* (0) Determine state */ 143 /* (0) Determine state */
144 exists = pedf->scheduled != NULL; 144 exists = pedf->scheduled != NULL;
145 blocks = exists && !is_running(pedf->scheduled); 145 blocks = exists && !is_running(pedf->scheduled);
146 out_of_time = exists && budget_exhausted(pedf->scheduled); 146 out_of_time = exists &&
147 budget_enforced(pedf->scheduled) &&
148 budget_exhausted(pedf->scheduled);
147 np = exists && is_np(pedf->scheduled); 149 np = exists && is_np(pedf->scheduled);
148 sleep = exists && get_rt_flags(pedf->scheduled) == RT_F_SLEEP; 150 sleep = exists && get_rt_flags(pedf->scheduled) == RT_F_SLEEP;
149 preempt = edf_preemption_needed(edf, prev); 151 preempt = edf_preemption_needed(edf, prev);