ia64/xen-unstable

changeset 10626:64f9f308e109

Don't modify global active weight when changing weight of inactive domain.
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
author ack@localhost.localdomain
date Fri Jun 30 17:12:05 2006 +0100 (2006-06-30)
parents 17e9daeb2c50
children 640d3bc77ea6
files xen/common/sched_credit.c
line diff
     1.1 --- a/xen/common/sched_credit.c	Fri Jun 30 14:41:13 2006 +0100
     1.2 +++ b/xen/common/sched_credit.c	Fri Jun 30 17:12:05 2006 +0100
     1.3 @@ -622,9 +622,12 @@ csched_dom_cntl(
     1.4  
     1.5          if ( cmd->u.credit.weight != 0 )
     1.6          {
     1.7 -            csched_priv.weight -= sdom->weight;
     1.8 +            if ( !list_empty(&sdom->active_sdom_elem) )
     1.9 +            {
    1.10 +                csched_priv.weight -= sdom->weight;
    1.11 +                csched_priv.weight += cmd->u.credit.weight;
    1.12 +            }
    1.13              sdom->weight = cmd->u.credit.weight;
    1.14 -            csched_priv.weight += sdom->weight;
    1.15          }
    1.16  
    1.17          if ( cmd->u.credit.cap != (uint16_t)~0U )