diff options
author | Namhoon Kim <namhoonk@cs.unc.edu> | 2016-04-30 19:46:44 -0400 |
---|---|---|
committer | Namhoon Kim <namhoonk@cs.unc.edu> | 2016-04-30 19:46:44 -0400 |
commit | fc35ca6c9592d43b067a45c49f98cf4b5b361b87 (patch) | |
tree | 9a7d7d6eec9ea24bea317de137cc0431ff54cb8b /litmus/litmus.c | |
parent | f0e07f0e5cba027377c57e1aa25101023640c62b (diff) |
PGM supportwip-mc2-new
Diffstat (limited to 'litmus/litmus.c')
-rw-r--r-- | litmus/litmus.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/litmus/litmus.c b/litmus/litmus.c index d72039067689..d2815f52876e 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c | |||
@@ -140,10 +140,16 @@ asmlinkage long sys_set_rt_task_param(pid_t pid, struct rt_task __user * param) | |||
140 | if (tp.relative_deadline == 0) | 140 | if (tp.relative_deadline == 0) |
141 | tp.relative_deadline = tp.period; | 141 | tp.relative_deadline = tp.period; |
142 | 142 | ||
143 | if (tp.exec_cost <= 0) | 143 | if (tp.exec_cost <= 0) { |
144 | printk(KERN_INFO "litmus: real-time task %d rejected " | ||
145 | "because declared job execution time <= 0.", pid); | ||
144 | goto out_unlock; | 146 | goto out_unlock; |
145 | if (tp.period <= 0) | 147 | } |
148 | if (tp.period <= 0) { | ||
149 | printk(KERN_INFO "litmus: real-time task %d rejected " | ||
150 | "because declared job period <= 0.", pid); | ||
146 | goto out_unlock; | 151 | goto out_unlock; |
152 | } | ||
147 | if (min(tp.relative_deadline, tp.period) < tp.exec_cost) /*density check*/ | 153 | if (min(tp.relative_deadline, tp.period) < tp.exec_cost) /*density check*/ |
148 | { | 154 | { |
149 | printk(KERN_INFO "litmus: real-time task %d rejected " | 155 | printk(KERN_INFO "litmus: real-time task %d rejected " |
@@ -169,6 +175,13 @@ asmlinkage long sys_set_rt_task_param(pid_t pid, struct rt_task __user * param) | |||
169 | goto out_unlock; | 175 | goto out_unlock; |
170 | } | 176 | } |
171 | 177 | ||
178 | if (tp.pgm_type < PGM_NOT_A_NODE || tp.pgm_type > PGM_INTERNAL) { | ||
179 | printk(KERN_INFO "litmus: real-time task %d rejected " | ||
180 | "because of unknown PGM node type specified (%d)\n", | ||
181 | pid, tp.pgm_type); | ||
182 | goto out_unlock; | ||
183 | } | ||
184 | |||
172 | target->rt_param.task_params = tp; | 185 | target->rt_param.task_params = tp; |
173 | 186 | ||
174 | retval = 0; | 187 | retval = 0; |
@@ -549,6 +562,10 @@ long litmus_admit_task(struct task_struct* tsk) | |||
549 | if (get_rt_relative_deadline(tsk) == 0 || | 562 | if (get_rt_relative_deadline(tsk) == 0 || |
550 | get_exec_cost(tsk) > | 563 | get_exec_cost(tsk) > |
551 | min(get_rt_relative_deadline(tsk), get_rt_period(tsk)) ) { | 564 | min(get_rt_relative_deadline(tsk), get_rt_period(tsk)) ) { |
565 | printk(KERN_INFO "litmus: invalid task parameters " | ||
566 | "(e = %lu, p = %lu, d = %lu)\n", | ||
567 | get_exec_cost(tsk), get_rt_period(tsk), | ||
568 | get_rt_relative_deadline(tsk)); | ||
552 | TRACE_TASK(tsk, | 569 | TRACE_TASK(tsk, |
553 | "litmus admit: invalid task parameters " | 570 | "litmus admit: invalid task parameters " |
554 | "(e = %lu, p = %lu, d = %lu)\n", | 571 | "(e = %lu, p = %lu, d = %lu)\n", |
@@ -580,6 +597,7 @@ long litmus_admit_task(struct task_struct* tsk) | |||
580 | if (!retval) { | 597 | if (!retval) { |
581 | sched_trace_task_name(tsk); | 598 | sched_trace_task_name(tsk); |
582 | sched_trace_task_param(tsk); | 599 | sched_trace_task_param(tsk); |
600 | sched_trace_pgm_param(tsk); | ||
583 | atomic_inc(&rt_task_count); | 601 | atomic_inc(&rt_task_count); |
584 | } | 602 | } |
585 | 603 | ||