--- sched_sedf.c 2012-03-21 11:40:27.000000000 +0100 +++ sched_sedf_monit_basic.c 2012-03-21 11:40:15.000000000 +0100 @@ -113,6 +113,7 @@ struct list_head waitq; struct list_head extraq[2]; s_time_t current_slice_expires; + }; #define EDOM_INFO(d) ((struct sedf_vcpu_info *)((d)->sched_priv)) @@ -782,13 +783,24 @@ } +/*Simple test*/ + +static void sedf_dyn_monit(const struct scheduler *ops, int cpu) +{ + uint64_t idle_time; + + idle_time = get_cpu_idle_time(cpu); + + printk("[HERE]idle_time = %llu \n", idle_time); + +} + /* Main scheduling function Reasons for calling this function are: -timeslice for the current period used up -domain on waitqueue has started it's period -and various others ;) in general: determine which domain to run next*/ -static struct task_slice sedf_do_schedule( - const struct scheduler *ops, s_time_t now, bool_t tasklet_work_scheduled) +static struct task_slice sedf_do_schedule(const struct scheduler *ops, s_time_t now, bool_t tasklet_work_scheduled) { int cpu = smp_processor_id(); struct list_head *runq = RUNQ(cpu); @@ -799,6 +811,10 @@ struct sedf_vcpu_info *runinf, *waitinf; struct task_slice ret; + + if ( NOW() >= (10*PERIOD_MAX)) sedf_dyn_monit(ops,cpu); + + /*idle tasks don't need any of the following stuf*/ if ( is_idle_vcpu(current) ) goto check_waitq; @@ -876,8 +892,15 @@ EDOM_INFO(ret.task)->sched_start_abs = now; CHECK(ret.time > 0); + + + + ASSERT(sedf_runnable(ret.task)); CPU_INFO(cpu)->current_slice_expires = now + ret.time; + + + return ret; }