ia64/xen-unstable

changeset 7171:716a0d177ffa

Possible fix for the SEDF scheduler assertion problem.

Signed-off-by: Stephan Diestelhorst <Stephan.Diestelhorst@{cl.cam.ac.uk, inf.tu-dresden.de}>
author jrb44@plym.cl.cam.ac.uk
date Mon Oct 03 23:28:24 2005 +0100 (2005-10-03)
parents 85f92475b943
children cc9988317416
files xen/common/sched_sedf.c
line diff
     1.1 --- a/xen/common/sched_sedf.c	Mon Oct 03 19:14:02 2005 +0100
     1.2 +++ b/xen/common/sched_sedf.c	Mon Oct 03 23:28:24 2005 +0100
     1.3 @@ -500,9 +500,15 @@ static inline void update_queues(s_time_
     1.4                    curinf->vcpu->domain->domain_id,
     1.5                    curinf->vcpu->vcpu_id);
     1.6              __del_from_queue(curinf->vcpu);
     1.7 -   
     1.8 +
     1.9              /*move them to their next period*/
    1.10              curinf->deadl_abs += curinf->period;
    1.11 +            /*ensure that the start of the next period is in the future*/
    1.12 +            if (unlikely(PERIOD_BEGIN(curinf) < now)) {
    1.13 +                curinf->deadl_abs += 
    1.14 +                    (DIV_UP(now - PERIOD_BEGIN(curinf),
    1.15 +                           curinf->period)) * curinf->period;
    1.16 +            }
    1.17              /*and put them back into the queue*/
    1.18              __add_to_waitqueue_sort(curinf->vcpu);
    1.19              continue;
    1.20 @@ -645,7 +651,7 @@ static inline struct task_slice sedf_do_
    1.21                                                          s_time_t end_xt, struct list_head *extraq[], int cpu) {
    1.22      struct task_slice   ret;
    1.23      struct sedf_vcpu_info *runinf;
    1.24 - 
    1.25 +    ASSERT(end_xt > now);
    1.26      /* Enough time left to use for extratime? */
    1.27      if (end_xt - now < EXTRA_QUANTUM)
    1.28          goto return_idle;