ia64/xen-unstable

changeset 12052:e0942ef72b8e

Merge.
author Steven Smith <ssmith@xensource.com>
date Tue Oct 31 10:12:35 2006 +0000 (2006-10-31)
parents c3b004aef317 64f0e77f2129
children 15b5cc51db30
files
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/interface.c	Tue Oct 31 10:11:53 2006 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/interface.c	Tue Oct 31 10:12:35 2006 +0000
     1.3 @@ -166,9 +166,6 @@ netif_t *netif_alloc(domid_t domid, unsi
     1.4  	SET_ETHTOOL_OPS(dev, &network_ethtool_ops);
     1.5  
     1.6  	dev->tx_queue_len = netbk_queue_length;
     1.7 -	if (dev->tx_queue_len != 0)
     1.8 -		printk(KERN_WARNING "netbk: WARNING: device '%s' has non-zero "
     1.9 -		       "queue length (%lu)!\n", dev->name, dev->tx_queue_len);
    1.10  
    1.11  	/*
    1.12  	 * Initialise a dummy MAC address. We choose the numerically
     2.1 --- a/xen/common/sched_credit.c	Tue Oct 31 10:11:53 2006 +0000
     2.2 +++ b/xen/common/sched_credit.c	Tue Oct 31 10:12:35 2006 +0000
     2.3 @@ -82,19 +82,12 @@
     2.4          printk("\t%-30s = %u\n", #_X, CSCHED_STAT(_X));  \
     2.5      } while ( 0 );
     2.6  
     2.7 +/*
     2.8 + * Try and keep often cranked stats on top so they'll fit on one
     2.9 + * cache line.
    2.10 + */
    2.11  #define CSCHED_STATS_EXPAND_SCHED(_MACRO)   \
    2.12 -    _MACRO(vcpu_init)                       \
    2.13 -    _MACRO(vcpu_sleep)                      \
    2.14 -    _MACRO(vcpu_wake_running)               \
    2.15 -    _MACRO(vcpu_wake_onrunq)                \
    2.16 -    _MACRO(vcpu_wake_runnable)              \
    2.17 -    _MACRO(vcpu_wake_not_runnable)          \
    2.18 -    _MACRO(dom_destroy)                     \
    2.19      _MACRO(schedule)                        \
    2.20 -    _MACRO(tickle_local_idler)              \
    2.21 -    _MACRO(tickle_local_over)               \
    2.22 -    _MACRO(tickle_local_under)              \
    2.23 -    _MACRO(tickle_local_other)              \
    2.24      _MACRO(acct_run)                        \
    2.25      _MACRO(acct_no_work)                    \
    2.26      _MACRO(acct_balance)                    \
    2.27 @@ -102,20 +95,28 @@
    2.28      _MACRO(acct_min_credit)                 \
    2.29      _MACRO(acct_vcpu_active)                \
    2.30      _MACRO(acct_vcpu_idle)                  \
    2.31 -    _MACRO(acct_vcpu_credit_min)
    2.32 -
    2.33 -#define CSCHED_STATS_EXPAND_SMP_LOAD_BALANCE(_MACRO)    \
    2.34 -    _MACRO(vcpu_migrate)                                \
    2.35 -    _MACRO(load_balance_idle)                           \
    2.36 -    _MACRO(load_balance_over)                           \
    2.37 -    _MACRO(load_balance_other)                          \
    2.38 -    _MACRO(steal_trylock_failed)                        \
    2.39 -    _MACRO(steal_peer_down)                             \
    2.40 -    _MACRO(steal_peer_idle)                             \
    2.41 -    _MACRO(steal_peer_running)                          \
    2.42 -    _MACRO(steal_peer_pinned)                           \
    2.43 -    _MACRO(tickle_idlers_none)                          \
    2.44 -    _MACRO(tickle_idlers_some)
    2.45 +    _MACRO(vcpu_sleep)                      \
    2.46 +    _MACRO(vcpu_wake_running)               \
    2.47 +    _MACRO(vcpu_wake_onrunq)                \
    2.48 +    _MACRO(vcpu_wake_runnable)              \
    2.49 +    _MACRO(vcpu_wake_not_runnable)          \
    2.50 +    _MACRO(tickle_local_idler)              \
    2.51 +    _MACRO(tickle_local_over)               \
    2.52 +    _MACRO(tickle_local_under)              \
    2.53 +    _MACRO(tickle_local_other)              \
    2.54 +    _MACRO(tickle_idlers_none)              \
    2.55 +    _MACRO(tickle_idlers_some)              \
    2.56 +    _MACRO(vcpu_migrate)                    \
    2.57 +    _MACRO(load_balance_idle)               \
    2.58 +    _MACRO(load_balance_over)               \
    2.59 +    _MACRO(load_balance_other)              \
    2.60 +    _MACRO(steal_trylock_failed)            \
    2.61 +    _MACRO(steal_peer_down)                 \
    2.62 +    _MACRO(steal_peer_idle)                 \
    2.63 +    _MACRO(steal_peer_running)              \
    2.64 +    _MACRO(steal_peer_pinned)               \
    2.65 +    _MACRO(vcpu_init)                       \
    2.66 +    _MACRO(dom_destroy)
    2.67  
    2.68  #ifndef NDEBUG
    2.69  #define CSCHED_STATS_EXPAND_CHECKS(_MACRO)  \
    2.70 @@ -124,10 +125,9 @@
    2.71  #define CSCHED_STATS_EXPAND_CHECKS(_MACRO)
    2.72  #endif
    2.73  
    2.74 -#define CSCHED_STATS_EXPAND(_MACRO)                 \
    2.75 -    CSCHED_STATS_EXPAND_SCHED(_MACRO)               \
    2.76 -    CSCHED_STATS_EXPAND_SMP_LOAD_BALANCE(_MACRO)    \
    2.77 -    CSCHED_STATS_EXPAND_CHECKS(_MACRO)
    2.78 +#define CSCHED_STATS_EXPAND(_MACRO)         \
    2.79 +    CSCHED_STATS_EXPAND_CHECKS(_MACRO)      \
    2.80 +    CSCHED_STATS_EXPAND_SCHED(_MACRO)
    2.81  
    2.82  #define CSCHED_STATS_RESET()                                        \
    2.83      do                                                              \
    2.84 @@ -177,11 +177,14 @@ struct csched_vcpu {
    2.85      struct csched_dom *sdom;
    2.86      struct vcpu *vcpu;
    2.87      atomic_t credit;
    2.88 -    int credit_last;
    2.89 -    uint32_t credit_incr;
    2.90 -    uint32_t state_active;
    2.91 -    uint32_t state_idle;
    2.92      int16_t pri;
    2.93 +    struct {
    2.94 +        int credit_last;
    2.95 +        uint32_t credit_incr;
    2.96 +        uint32_t state_active;
    2.97 +        uint32_t state_idle;
    2.98 +        uint32_t migrate;
    2.99 +    } stats;
   2.100  };
   2.101  
   2.102  /*
   2.103 @@ -404,7 +407,7 @@ csched_vcpu_acct(struct csched_vcpu *svc
   2.104          if ( list_empty(&svc->active_vcpu_elem) )
   2.105          {
   2.106              CSCHED_STAT_CRANK(acct_vcpu_active);
   2.107 -            svc->state_active++;
   2.108 +            svc->stats.state_active++;
   2.109  
   2.110              sdom->active_vcpu_count++;
   2.111              list_add(&svc->active_vcpu_elem, &sdom->active_vcpu);
   2.112 @@ -435,7 +438,7 @@ static inline void
   2.113      BUG_ON( list_empty(&svc->active_vcpu_elem) );
   2.114  
   2.115      CSCHED_STAT_CRANK(acct_vcpu_idle);
   2.116 -    svc->state_idle++;
   2.117 +    svc->stats.state_idle++;
   2.118  
   2.119      sdom->active_vcpu_count--;
   2.120      list_del_init(&svc->active_vcpu_elem);
   2.121 @@ -495,11 +498,8 @@ csched_vcpu_init(struct vcpu *vc)
   2.122      svc->sdom = sdom;
   2.123      svc->vcpu = vc;
   2.124      atomic_set(&svc->credit, 0);
   2.125 -    svc->credit_last = 0;
   2.126 -    svc->credit_incr = 0U;
   2.127 -    svc->state_active = 0U;
   2.128 -    svc->state_idle = 0U;
   2.129      svc->pri = pri;
   2.130 +    memset(&svc->stats, 0, sizeof(svc->stats));
   2.131      vc->sched_priv = svc;
   2.132  
   2.133      CSCHED_VCPU_CHECK(vc);
   2.134 @@ -864,8 +864,8 @@ csched_acct(void)
   2.135                  }
   2.136              }
   2.137  
   2.138 -            svc->credit_last = credit;
   2.139 -            svc->credit_incr = credit_fair;
   2.140 +            svc->stats.credit_last = credit;
   2.141 +            svc->stats.credit_incr = credit_fair;
   2.142              credit_balance += credit;
   2.143          }
   2.144      }
   2.145 @@ -1014,6 +1014,7 @@ csched_load_balance(int cpu, struct csch
   2.146          if ( speer )
   2.147          {
   2.148              CSCHED_STAT_CRANK(vcpu_migrate);
   2.149 +            speer->stats.migrate++;
   2.150              return speer;
   2.151          }
   2.152      }
   2.153 @@ -1100,12 +1101,13 @@ csched_dump_vcpu(struct csched_vcpu *svc
   2.154  
   2.155      if ( sdom )
   2.156      {
   2.157 -        printk(" credit=%i (%d+%u) {a=%u i=%u w=%u}",
   2.158 +        printk(" credit=%i (%d+%u) {a/i=%u/%u m=%u w=%u}",
   2.159              atomic_read(&svc->credit),
   2.160 -            svc->credit_last,
   2.161 -            svc->credit_incr,
   2.162 -            svc->state_active,
   2.163 -            svc->state_idle,
   2.164 +            svc->stats.credit_last,
   2.165 +            svc->stats.credit_incr,
   2.166 +            svc->stats.state_active,
   2.167 +            svc->stats.state_idle,
   2.168 +            svc->stats.migrate,
   2.169              sdom->weight);
   2.170      }
   2.171