diff options
author | Bjoern Brandenburg <bbb@mpi-sws.org> | 2016-06-23 06:32:22 -0400 |
---|---|---|
committer | Bjoern Brandenburg <bbb@mpi-sws.org> | 2016-06-23 06:32:22 -0400 |
commit | e779944bc6ccaa86869fcbc693ee4e9369fb322e (patch) | |
tree | c295e1fee4854803aee8e259d9186950f3cdd515 | |
parent | ae73c266aaf6e14b1e303d8066d3036cf3d62c37 (diff) |
LITMUS^RT core: keep track of time of last suspension
This information is needed to insert ST_COMPLETION records for
sporadic tasks.
-rw-r--r-- | include/litmus/rt_param.h | 6 | ||||
-rw-r--r-- | kernel/sched/litmus.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h index 0070cbcbe21e..7663e0806531 100644 --- a/include/litmus/rt_param.h +++ b/include/litmus/rt_param.h | |||
@@ -155,6 +155,12 @@ struct rt_job { | |||
155 | * Increase this sequence number when a job is released. | 155 | * Increase this sequence number when a job is released. |
156 | */ | 156 | */ |
157 | unsigned int job_no; | 157 | unsigned int job_no; |
158 | |||
159 | #ifdef CONFIG_SCHED_TASK_TRACE | ||
160 | /* Keep track of the last time the job suspended. | ||
161 | * -> used for tracing sporadic tasks. */ | ||
162 | lt_t last_suspension; | ||
163 | #endif | ||
158 | }; | 164 | }; |
159 | 165 | ||
160 | struct pfair_param; | 166 | struct pfair_param; |
diff --git a/kernel/sched/litmus.c b/kernel/sched/litmus.c index fdb17e958adb..979f0a946220 100644 --- a/kernel/sched/litmus.c +++ b/kernel/sched/litmus.c | |||
@@ -218,6 +218,9 @@ static void dequeue_task_litmus(struct rq *rq, struct task_struct *p, | |||
218 | int flags) | 218 | int flags) |
219 | { | 219 | { |
220 | if (flags & DEQUEUE_SLEEP) { | 220 | if (flags & DEQUEUE_SLEEP) { |
221 | #ifdef CONFIG_SCHED_TASK_TRACE | ||
222 | tsk_rt(p)->job_params.last_suspension = litmus_clock(); | ||
223 | #endif | ||
221 | litmus->task_block(p); | 224 | litmus->task_block(p); |
222 | tsk_rt(p)->present = 0; | 225 | tsk_rt(p)->present = 0; |
223 | sched_trace_task_block(p); | 226 | sched_trace_task_block(p); |