aboutsummaryrefslogtreecommitdiffstats
path: root/litmus/sched_cfifo.c
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-01-20 11:09:15 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-01-20 11:09:15 -0500
commitf5264e2cb8213dad425cb2d2db564edbc443a51a (patch)
treefe373a62364d0851cde0beed1bda846d11443fb1 /litmus/sched_cfifo.c
parent1a582a2c5e361e01a4c64f185bb1a23c3f70701a (diff)
Fix bugs in tracing and PAI handling
Diffstat (limited to 'litmus/sched_cfifo.c')
-rw-r--r--litmus/sched_cfifo.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/litmus/sched_cfifo.c b/litmus/sched_cfifo.c
index 689b2dbe5fae..7fbdec3f1d15 100644
--- a/litmus/sched_cfifo.c
+++ b/litmus/sched_cfifo.c
@@ -57,6 +57,7 @@
57 57
58#ifdef CONFIG_LITMUS_PAI_SOFTIRQD 58#ifdef CONFIG_LITMUS_PAI_SOFTIRQD
59#include <linux/interrupt.h> 59#include <linux/interrupt.h>
60#include <litmus/trace.h>
60#endif 61#endif
61 62
62#ifdef CONFIG_LITMUS_NVIDIA 63#ifdef CONFIG_LITMUS_NVIDIA
@@ -530,6 +531,9 @@ static void do_lit_tasklets(cfifo_domain_t* cluster, struct task_struct* sched_t
530 unsigned long flags; 531 unsigned long flags;
531 532
532 while(work_to_do) { 533 while(work_to_do) {
534
535 TS_NV_SCHED_BOTISR_START;
536
533 // remove tasklet at head of list if it has higher priority. 537 // remove tasklet at head of list if it has higher priority.
534 raw_spin_lock_irqsave(&cluster->cfifo_lock, flags); 538 raw_spin_lock_irqsave(&cluster->cfifo_lock, flags);
535 539
@@ -584,6 +588,8 @@ static void do_lit_tasklets(cfifo_domain_t* cluster, struct task_struct* sched_t
584 588
585 raw_spin_unlock_irqrestore(&cluster->cfifo_lock, flags); 589 raw_spin_unlock_irqrestore(&cluster->cfifo_lock, flags);
586 590
591 TS_NV_SCHED_BOTISR_END;
592
587 if(tasklet) { 593 if(tasklet) {
588 __do_lit_tasklet(tasklet, 0ul); 594 __do_lit_tasklet(tasklet, 0ul);
589 tasklet = NULL; 595 tasklet = NULL;
@@ -1071,6 +1077,10 @@ static void cfifo_task_exit(struct task_struct * t)
1071 unsigned long flags; 1077 unsigned long flags;
1072 cfifo_domain_t *cluster = task_cpu_cluster(t); 1078 cfifo_domain_t *cluster = task_cpu_cluster(t);
1073 1079
1080#ifdef CONFIG_LITMUS_PAI_SOFTIRQD
1081 flush_tasklets(cluster, t);
1082#endif
1083
1074 /* unlink if necessary */ 1084 /* unlink if necessary */
1075 raw_spin_lock_irqsave(&cluster->cfifo_lock, flags); 1085 raw_spin_lock_irqsave(&cluster->cfifo_lock, flags);
1076 unlink(t); 1086 unlink(t);
@@ -1081,10 +1091,6 @@ static void cfifo_task_exit(struct task_struct * t)
1081 tsk_rt(t)->scheduled_on = NO_CPU; 1091 tsk_rt(t)->scheduled_on = NO_CPU;
1082 } 1092 }
1083 raw_spin_unlock_irqrestore(&cluster->cfifo_lock, flags); 1093 raw_spin_unlock_irqrestore(&cluster->cfifo_lock, flags);
1084
1085#ifdef CONFIG_LITMUS_PAI_SOFTIRQD
1086 flush_tasklets(cluster, t);
1087#endif
1088 1094
1089 BUG_ON(!is_realtime(t)); 1095 BUG_ON(!is_realtime(t));
1090 TRACE_TASK(t, "RIP\n"); 1096 TRACE_TASK(t, "RIP\n");