aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-07-26 00:35:37 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-07-26 00:35:37 -0400
commit3512dc22c9036157603a27c90cd683d1a583f1cd (patch)
tree5aaea90c84400f1f8530293f26965b19c81b09c4
parentb5d621c9e223365e149b7ebfdf6a5889c843b5be (diff)
P-FP: trace more debugging info
...and make per-processor state available in gdb.
-rw-r--r--litmus/sched_pfp.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/litmus/sched_pfp.c b/litmus/sched_pfp.c
index 29f1efdcffc6..a86f7df04f85 100644
--- a/litmus/sched_pfp.c
+++ b/litmus/sched_pfp.c
@@ -38,6 +38,8 @@ typedef struct {
38 38
39DEFINE_PER_CPU(pfp_domain_t, pfp_domains); 39DEFINE_PER_CPU(pfp_domain_t, pfp_domains);
40 40
41pfp_domain_t* pfp_doms[NR_CPUS];
42
41#define local_pfp (&__get_cpu_var(pfp_domains)) 43#define local_pfp (&__get_cpu_var(pfp_domains))
42#define remote_dom(cpu) (&per_cpu(pfp_domains, cpu).domain) 44#define remote_dom(cpu) (&per_cpu(pfp_domains, cpu).domain)
43#define remote_pfp(cpu) (&per_cpu(pfp_domains, cpu)) 45#define remote_pfp(cpu) (&per_cpu(pfp_domains, cpu))
@@ -78,12 +80,16 @@ static void pfp_release_jobs(rt_domain_t* rt, struct bheap* tasks)
78 while (!bheap_empty(tasks)) { 80 while (!bheap_empty(tasks)) {
79 hn = bheap_take(fp_ready_order, tasks); 81 hn = bheap_take(fp_ready_order, tasks);
80 t = bheap2task(hn); 82 t = bheap2task(hn);
83 TRACE_TASK(t, "released (part:%d prio:%d)\n",
84 get_partition(t), get_priority(t));
81 fp_prio_add(&pfp->ready_queue, t, priority_index(t)); 85 fp_prio_add(&pfp->ready_queue, t, priority_index(t));
82 } 86 }
83 87
84 /* do we need to preempt? */ 88 /* do we need to preempt? */
85 if (fp_higher_prio(fp_prio_peek(&pfp->ready_queue), pfp->scheduled)) 89 if (fp_higher_prio(fp_prio_peek(&pfp->ready_queue), pfp->scheduled)) {
90 TRACE_CUR("preempted by new release\n");
86 preempt(pfp); 91 preempt(pfp);
92 }
87 93
88 raw_spin_unlock_irqrestore(&pfp->slock, flags); 94 raw_spin_unlock_irqrestore(&pfp->slock, flags);
89} 95}
@@ -346,11 +352,15 @@ static void fp_set_prio_inh(pfp_domain_t* pfp, struct task_struct* t,
346{ 352{
347 int requeue; 353 int requeue;
348 354
349 if (!t || t->rt_param.inh_task == prio_inh) 355 if (!t || t->rt_param.inh_task == prio_inh) {
350 /* no update required */ 356 /* no update required */
357 if (t)
358 TRACE_TASK(t, "no prio-inh update required\n");
351 return; 359 return;
360 }
352 361
353 requeue = is_queued(t); 362 requeue = is_queued(t);
363 TRACE_TASK(t, "prio-inh: is_queued:%d\n", requeue);
354 364
355 if (requeue) 365 if (requeue)
356 /* first remove */ 366 /* first remove */
@@ -1439,6 +1449,7 @@ static long pfp_activate_plugin(void)
1439 per_cpu(mpcpvs_vspin, cpu) = NULL; 1449 per_cpu(mpcpvs_vspin, cpu) = NULL;
1440 1450
1441 pcp_init_state(&per_cpu(pcp_state, cpu)); 1451 pcp_init_state(&per_cpu(pcp_state, cpu));
1452 pfp_doms[cpu] = remote_pfp(cpu);
1442 } 1453 }
1443 1454
1444#endif 1455#endif