diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-05-11 11:10:24 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-05-11 11:10:24 +0100 |
commit | a974b14d790ce883da98ba8094a0c59109bae0b7 (patch) | |
tree | 1d97d9c50e4fb676c0c3e3ada2cfd3b1f9cd6921 /xen/common/sched_sedf.c | |
parent | 0e13089b1456e71c99005caa7d4b78ba34656337 (diff) | |
download | xen-a974b14d790ce883da98ba8094a0c59109bae0b7.tar.gz xen-a974b14d790ce883da98ba8094a0c59109bae0b7.tar.bz2 xen-a974b14d790ce883da98ba8094a0c59109bae0b7.zip |
tasklet: Improve scheduler interaction.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/common/sched_sedf.c')
-rw-r--r-- | xen/common/sched_sedf.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/xen/common/sched_sedf.c b/xen/common/sched_sedf.c index 6f7cc2eba3..6223fc030d 100644 --- a/xen/common/sched_sedf.c +++ b/xen/common/sched_sedf.c @@ -790,7 +790,8 @@ static struct task_slice sedf_do_extra_schedule( -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) +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); @@ -826,18 +827,13 @@ static struct task_slice sedf_do_schedule(const struct scheduler *ops, s_time_t check_waitq: update_queues(now, runq, waitq); - if ( unlikely(!cpu_isset(cpu, *SEDF_CPUONLINE(per_cpu(cpupool, cpu)))) ) - { - ret.task = IDLETASK(cpu); - ret.time = SECONDS(1); - goto sched_done; - } - /*now simply pick the first domain from the runqueue, which has the earliest deadline, because the list is sorted*/ /* Tasklet work (which runs in idle VCPU context) overrides all else. */ - if ( !tasklet_queue_empty(cpu) || (list_empty(runq) && list_empty(waitq)) ) + if ( tasklet_work_scheduled || + (list_empty(runq) && list_empty(waitq)) || + unlikely(!cpu_isset(cpu, *SEDF_CPUONLINE(per_cpu(cpupool, cpu)))) ) { ret.task = IDLETASK(cpu); ret.time = SECONDS(1); @@ -870,7 +866,6 @@ static struct task_slice sedf_do_schedule(const struct scheduler *ops, s_time_t extraq, cpu); } - sched_done: /*TODO: Do something USEFUL when this happens and find out, why it still can happen!!!*/ if ( ret.time < 0) |