From 987e83646701cee38c6378c84017cc2aabde39a9 Mon Sep 17 00:00:00 2001 From: Andrea Bastoni Date: Tue, 28 Sep 2010 00:32:55 -0400 Subject: Add extra tracing points and format old traces --- litmus/sched_edf_fm.c | 3 +++ litmus/sched_npsf.c | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/litmus/sched_edf_fm.c b/litmus/sched_edf_fm.c index 38b5a3f97101..b7210725c072 100644 --- a/litmus/sched_edf_fm.c +++ b/litmus/sched_edf_fm.c @@ -271,6 +271,9 @@ static int next_cpu_for_job(struct task_struct *t) { BUG_ON(!is_migrat_task(t)); + TRACE_TASK(t, "%u = %u * %u / %u\n", + t->rt_param.job_params.job_no, cur_cpu_job_no(t), + cur_cpu_fract_den(t), cur_cpu_fract_num(t)); if ((t->rt_param.job_params.job_no) == (((lt_t) cur_cpu_job_no(t) * cur_cpu_fract_den(t)) / cur_cpu_fract_num(t))) diff --git a/litmus/sched_npsf.c b/litmus/sched_npsf.c index 0c8a747fc6ca..9f45f9632e97 100644 --- a/litmus/sched_npsf.c +++ b/litmus/sched_npsf.c @@ -507,7 +507,7 @@ static struct task_struct* npsf_schedule(struct task_struct * prev) if (is_realtime(prev) && task_npsfid(prev) == entry->cpu_reserve->npsf_id) npsf_schedule_server(prev, entry); else if (is_realtime(prev)) - TRACE_TASK(prev, "npsf_id %d != cpu_reserve npsf_id %d", + TRACE_TASK(prev, "npsf_id %d != cpu_reserve npsf_id %d\n", task_npsfid(prev), entry->cpu_reserve->npsf_id); /* step 4: determine if we need to switch to another reserve */ @@ -866,6 +866,9 @@ static long do_add_reserve(npsf_reserve_t **new, cpu_entry_t *cpu, (*new)->budget = budget; (*new)->cpu = cpu; + npsf_printk("Add npsf_id %d on P%d with budget %llu\n", (*new)->npsf_id, + (*new)->cpu->cpu, (*new)->budget); + raw_spin_lock_irqsave(&cpu->cpu_res_lock, flags); list_add_tail(&(*new)->node, &cpu->npsf_reserves); @@ -978,6 +981,8 @@ asmlinkage long sys_add_server(int __user *__id, if (last) { /* force the first slot switching by setting the * current_reserve to the last server for each cpu. + * + * FIXME:don't assume there exists at least one reserve per CPU */ for_each_online_cpu(i) { entry = &per_cpu(npsf_cpu_entries, i); -- cgit v1.2.2