aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/rt_domain.c
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2012-10-19 03:11:22 -0400
committerJonathan Herman <hermanjl@cs.unc.edu>2012-10-19 03:11:22 -0400
commitb3515bc01961266077b0892c86866f83df45f2c9 (patch)
tree3bef187a1d6b427a70b2222a5a4c5ee7da0e116c /litmus/rt_domain.c
parent50e135f239c574d04e92e55255680c0504ec460f (diff)
Disabled release master work.
Diffstat (limited to 'litmus/rt_domain.c')
-rw-r--r--litmus/rt_domain.c100
1 files changed, 50 insertions, 50 deletions
diff --git a/litmus/rt_domain.c b/litmus/rt_domain.c
index 6e6a1236bb25..098ea000f5de 100644
--- a/litmus/rt_domain.c
+++ b/litmus/rt_domain.c
@@ -194,10 +194,10 @@ static void reinit_release_heap(rt_domain_t *rt, struct task_struct* t)
194 /* use pre-allocated release heap */ 194 /* use pre-allocated release heap */
195 rh = tsk_rt(t)->rel_heap; 195 rh = tsk_rt(t)->rel_heap;
196 196
197#ifdef CONFIG_MERGE_TIMERS 197/* #ifdef CONFIG_MERGE_TIMERS */
198 rh->event.prio = rt->prio; 198/* rh->event.prio = rt->prio; */
199 cancel_event(&rh->event); 199/* cancel_event(&rh->event); */
200#else 200/* #else */
201 /* Make sure it is safe to use. The timer callback could still 201 /* Make sure it is safe to use. The timer callback could still
202 * be executing on another CPU; hrtimer_cancel() will wait 202 * be executing on another CPU; hrtimer_cancel() will wait
203 * until the timer callback has completed. However, under no 203 * until the timer callback has completed. However, under no
@@ -209,20 +209,20 @@ static void reinit_release_heap(rt_domain_t *rt, struct task_struct* t)
209 */ 209 */
210 BUG_ON(hrtimer_cancel(&rh->timer)); 210 BUG_ON(hrtimer_cancel(&rh->timer));
211 211
212#ifdef CONFIG_RELEASE_MASTER 212/* #ifdef CONFIG_RELEASE_MASTER */
213 atomic_set(&rh->info.state, HRTIMER_START_ON_INACTIVE); 213/* atomic_set(&rh->info.state, HRTIMER_START_ON_INACTIVE); */
214#endif 214/* #endif */
215#endif 215/* #endif */
216 /* initialize */ 216 /* initialize */
217 bheap_init(&rh->heap); 217 bheap_init(&rh->heap);
218 218
219} 219}
220 220
221#ifdef CONFIG_RELEASE_MASTER 221/* #ifdef CONFIG_RELEASE_MASTER */
222static void arm_release_timer_on(struct release_heap *rh, int target_cpu) 222/* static void arm_release_timer_on(struct release_heap *rh, int target_cpu) */
223#else 223/* #else */
224static void arm_release_timer(struct release_heap *rh) 224static void arm_release_timer(struct release_heap *rh)
225#endif 225//#endif
226{ 226{
227#ifdef CONFIG_MERGE_TIMERS 227#ifdef CONFIG_MERGE_TIMERS
228 add_event(rh->dom->event_group, &rh->event, rh->release_time); 228 add_event(rh->dom->event_group, &rh->event, rh->release_time);
@@ -233,21 +233,21 @@ static void arm_release_timer(struct release_heap *rh)
233 * PINNED mode is ok on both local and remote CPU 233 * PINNED mode is ok on both local and remote CPU
234 */ 234 */
235 235
236#ifdef CONFIG_RELEASE_MASTER 236/* #ifdef CONFIG_RELEASE_MASTER */
237 if (rh->dom->release_master == NO_CPU && target_cpu == NO_CPU) 237/* if (rh->dom->release_master == NO_CPU && target_cpu == NO_CPU) */
238#endif 238/* #endif */
239 __hrtimer_start_range_ns(&rh->timer, 239 __hrtimer_start_range_ns(&rh->timer,
240 ns_to_ktime(rh->release_time), 240 ns_to_ktime(rh->release_time),
241 0, HRTIMER_MODE_ABS_PINNED, 0); 241 0, HRTIMER_MODE_ABS_PINNED, 0);
242#ifdef CONFIG_RELEASE_MASTER 242/* #ifdef CONFIG_RELEASE_MASTER */
243 else 243/* else */
244 hrtimer_start_on(/* target_cpu overrides release master */ 244/* hrtimer_start_on(/\* target_cpu overrides release master *\/ */
245 (target_cpu != NO_CPU ? 245/* (target_cpu != NO_CPU ? */
246 target_cpu : rh->dom->release_master), 246/* target_cpu : rh->dom->release_master), */
247 &rh->info, &rh->timer, 247/* &rh->info, &rh->timer, */
248 ns_to_ktime(rh->release_time), 248/* ns_to_ktime(rh->release_time), */
249 HRTIMER_MODE_ABS_PINNED); 249/* HRTIMER_MODE_ABS_PINNED); */
250#endif 250/* #endif */
251#endif 251#endif
252} 252}
253 253
@@ -259,12 +259,12 @@ static void arm_release_timer(struct release_heap *rh)
259 * - tobe_lock taken 259 * - tobe_lock taken
260 * - IRQ disabled 260 * - IRQ disabled
261 */ 261 */
262#ifdef CONFIG_RELEASE_MASTER 262/* #ifdef CONFIG_RELEASE_MASTER */
263#define setup_release(t) setup_release_on((t), NO_CPU) 263/* #define setup_release(t) setup_release_on((t), NO_CPU) */
264static void setup_release_on(rt_domain_t *_rt , int target_cpu) 264/* static void setup_release_on(rt_domain_t *_rt , int target_cpu) */
265#else 265/* #else */
266static void setup_release(rt_domain_t *_rt) 266static void setup_release(rt_domain_t *_rt)
267#endif 267/* #endif */
268{ 268{
269 rt_domain_t *rt = _rt; 269 rt_domain_t *rt = _rt;
270 struct list_head list; 270 struct list_head list;
@@ -312,11 +312,11 @@ static void setup_release(rt_domain_t *_rt)
312 * this release_heap anyway). 312 * this release_heap anyway).
313 */ 313 */
314 if (rh == tsk_rt(t)->rel_heap) { 314 if (rh == tsk_rt(t)->rel_heap) {
315#ifdef CONFIG_RELEASE_MASTER 315/* #ifdef CONFIG_RELEASE_MASTER */
316 arm_release_timer_on(rh, target_cpu); 316/* arm_release_timer_on(rh, target_cpu); */
317#else 317/* #else */
318 arm_release_timer(rh); 318 arm_release_timer(rh);
319#endif 319/* #endif */
320 } 320 }
321 } 321 }
322} 322}
@@ -336,9 +336,9 @@ void rt_domain_init(rt_domain_t *rt,
336 if (!order) 336 if (!order)
337 order = dummy_order; 337 order = dummy_order;
338 338
339#if defined(CONFIG_RELEASE_MASTER) && !defined(CONFIG_MERGE_TIMERS) 339/* #if defined(CONFIG_RELEASE_MASTER) && !defined(CONFIG_MERGE_TIMERS) */
340 rt->release_master = NO_CPU; 340/* rt->release_master = NO_CPU; */
341#endif 341/* #endif */
342 342
343 bheap_init(&rt->ready_queue); 343 bheap_init(&rt->ready_queue);
344 INIT_LIST_HEAD(&rt->tobe_released); 344 INIT_LIST_HEAD(&rt->tobe_released);
@@ -380,23 +380,23 @@ void __merge_ready(rt_domain_t* rt, struct bheap* tasks)
380} 380}
381 381
382 382
383#ifdef CONFIG_RELEASE_MASTER 383/* #ifdef CONFIG_RELEASE_MASTER */
384void __add_release_on(rt_domain_t* rt, struct task_struct *task, 384/* void __add_release_on(rt_domain_t* rt, struct task_struct *task, */
385 int target_cpu) 385/* int target_cpu) */
386{ 386/* { */
387 VTRACE_TASK(task, "add_release_on(), rel=%llu, target=%d\n", 387/* VTRACE_TASK(task, "add_release_on(), rel=%llu, target=%d\n", */
388 get_release(task), target_cpu); 388/* get_release(task), target_cpu); */
389 list_add(&tsk_rt(task)->list, &rt->tobe_released); 389/* list_add(&tsk_rt(task)->list, &rt->tobe_released); */
390 task->rt_param.domain = rt; 390/* task->rt_param.domain = rt; */
391 391
392 /* start release timer */ 392/* /\* start release timer *\/ */
393 TS_SCHED2_START(task); 393/* TS_SCHED2_START(task); */
394 394
395 setup_release_on(rt, target_cpu); 395/* setup_release_on(rt, target_cpu); */
396 396
397 TS_SCHED2_END(task); 397/* TS_SCHED2_END(task); */
398} 398/* } */
399#endif 399/* #endif */
400 400
401/* add_release - add a real-time task to the rt release queue. 401/* add_release - add a real-time task to the rt release queue.
402 * @task: the sleeping task 402 * @task: the sleeping task