ia64/xen-unstable

changeset 1993:db1f7470f144

bitkeeper revision 1.1108.40.1 (41092cdfpganwDsmLTIjObLf_WiAXA)

CPU migration flag added
author gm281@boulderdash.cl.cam.ac.uk
date Thu Jul 29 16:59:11 2004 +0000 (2004-07-29)
parents 0475742a106f
children 541e28a374a6
files xen/common/dom0_ops.c xen/common/schedule.c xen/include/xen/sched.h
line diff
     1.1 --- a/xen/common/dom0_ops.c	Thu Jul 29 12:50:12 2004 +0000
     1.2 +++ b/xen/common/dom0_ops.c	Thu Jul 29 16:59:11 2004 +0000
     1.3 @@ -248,6 +248,8 @@ long do_dom0_op(dom0_op_t *u_dom0_op)
     1.4          else
     1.5          {
     1.6              domain_pause(d);
     1.7 +            if(d->processor != cpu % smp_num_cpus)
     1.8 +                set_bit(DF_MIGRATED, &d->flags);
     1.9              set_bit(DF_CPUPINNED, &d->flags);
    1.10              d->processor = cpu % smp_num_cpus;
    1.11              domain_unpause(d);
     2.1 --- a/xen/common/schedule.c	Thu Jul 29 12:50:12 2004 +0000
     2.2 +++ b/xen/common/schedule.c	Thu Jul 29 16:59:11 2004 +0000
     2.3 @@ -193,7 +193,9 @@ void domain_wake(struct domain *d)
     2.4          d->wokenup = NOW();
     2.5  #endif
     2.6      }
     2.7 -
     2.8 +    
     2.9 +    clear_bit(DF_MIGRATED, &d->flags);
    2.10 +    
    2.11      spin_unlock_irqrestore(&d->state_lock, flags);
    2.12  }
    2.13  
     3.1 --- a/xen/include/xen/sched.h	Thu Jul 29 12:50:12 2004 +0000
     3.2 +++ b/xen/include/xen/sched.h	Thu Jul 29 16:59:11 2004 +0000
     3.3 @@ -246,6 +246,7 @@ extern struct domain *task_list;
     3.4  #define DF_DYING       11 /* Death rattle.                                  */
     3.5  #define DF_RUNNING     12 /* Currently running on a CPU.                    */
     3.6  #define DF_CPUPINNED   13 /* Disables auto-migration.                       */
     3.7 +#define DF_MIGRATED    14 /* Domain migrated between CPUs.                  */ 
     3.8  
     3.9  static inline int domain_runnable(struct domain *d)
    3.10  {