diff options
Diffstat (limited to 'litmus/litmus.c')
-rw-r--r-- | litmus/litmus.c | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/litmus/litmus.c b/litmus/litmus.c index ab0bcac13252..8937f5233b0e 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c | |||
@@ -107,12 +107,19 @@ asmlinkage long sys_set_rt_task_param(pid_t pid, struct rt_task __user * param) | |||
107 | if (tp.relative_deadline == 0) | 107 | if (tp.relative_deadline == 0) |
108 | tp.relative_deadline = tp.period; | 108 | tp.relative_deadline = tp.period; |
109 | 109 | ||
110 | if (tp.exec_cost <= 0) | 110 | if (tp.exec_cost <= 0) { |
111 | printk(KERN_INFO "litmus: real-time task %d rejected " | ||
112 | "because declared job execution time <= 0.", pid); | ||
111 | goto out_unlock; | 113 | goto out_unlock; |
112 | if (tp.period <= 0) | 114 | } |
115 | if (tp.period <= 0) { | ||
116 | printk(KERN_INFO "litmus: real-time task %d rejected " | ||
117 | "because declared job period <= 0.", pid); | ||
113 | goto out_unlock; | 118 | goto out_unlock; |
114 | if (!cpu_online(tp.cpu)) | 119 | } |
120 | if (!cpu_online(tp.cpu)) { | ||
115 | goto out_unlock; | 121 | goto out_unlock; |
122 | } | ||
116 | if (min(tp.relative_deadline, tp.period) < tp.exec_cost) /*density check*/ | 123 | if (min(tp.relative_deadline, tp.period) < tp.exec_cost) /*density check*/ |
117 | { | 124 | { |
118 | printk(KERN_INFO "litmus: real-time task %d rejected " | 125 | printk(KERN_INFO "litmus: real-time task %d rejected " |
@@ -331,9 +338,13 @@ long litmus_admit_task(struct task_struct* tsk) | |||
331 | if (get_rt_relative_deadline(tsk) == 0 || | 338 | if (get_rt_relative_deadline(tsk) == 0 || |
332 | get_exec_cost(tsk) > | 339 | get_exec_cost(tsk) > |
333 | min(get_rt_relative_deadline(tsk), get_rt_period(tsk)) ) { | 340 | min(get_rt_relative_deadline(tsk), get_rt_period(tsk)) ) { |
341 | printk(KERN_INFO "litmus: invalid task parameters " | ||
342 | "(e = %llu, p = %llu, d = %llu)\n", | ||
343 | get_exec_cost(tsk), get_rt_period(tsk), | ||
344 | get_rt_relative_deadline(tsk)); | ||
334 | TRACE_TASK(tsk, | 345 | TRACE_TASK(tsk, |
335 | "litmus admit: invalid task parameters " | 346 | "litmus admit: invalid task parameters " |
336 | "(e = %lu, p = %lu, d = %lu)\n", | 347 | "(e = %llu, p = %llu, d = %llu)\n", |
337 | get_exec_cost(tsk), get_rt_period(tsk), | 348 | get_exec_cost(tsk), get_rt_period(tsk), |
338 | get_rt_relative_deadline(tsk)); | 349 | get_rt_relative_deadline(tsk)); |
339 | retval = -EINVAL; | 350 | retval = -EINVAL; |
@@ -341,6 +352,8 @@ long litmus_admit_task(struct task_struct* tsk) | |||
341 | } | 352 | } |
342 | 353 | ||
343 | if (!cpu_online(get_partition(tsk))) { | 354 | if (!cpu_online(get_partition(tsk))) { |
355 | printk(KERN_INFO "litmus: cpu %d is not online\n", | ||
356 | get_partition(tsk)); | ||
344 | TRACE_TASK(tsk, "litmus admit: cpu %d is not online\n", | 357 | TRACE_TASK(tsk, "litmus admit: cpu %d is not online\n", |
345 | get_partition(tsk)); | 358 | get_partition(tsk)); |
346 | retval = -EINVAL; | 359 | retval = -EINVAL; |
@@ -369,6 +382,7 @@ long litmus_admit_task(struct task_struct* tsk) | |||
369 | if (!retval) { | 382 | if (!retval) { |
370 | sched_trace_task_name(tsk); | 383 | sched_trace_task_name(tsk); |
371 | sched_trace_task_param(tsk); | 384 | sched_trace_task_param(tsk); |
385 | sched_trace_pgm_param(tsk); | ||
372 | atomic_inc(&rt_task_count); | 386 | atomic_inc(&rt_task_count); |
373 | } | 387 | } |
374 | 388 | ||