debuggers.hg

diff xen/common/sched_rrobin.c @ 3658:0ef6e8e6e85d

bitkeeper revision 1.1159.212.71 (4200f0afX_JumfbEHQex6TdFENULMQ)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
into labyrinth.cl.cam.ac.uk:/auto/groups/xeno/users/iap10/xeno-clone/xen-unstable.bk
author iap10@labyrinth.cl.cam.ac.uk
date Wed Feb 02 15:24:31 2005 +0000 (2005-02-02)
parents 51052c8b6456 f98fa170a9f4
children bbe8541361dd 4294cfa9fad3
line diff
     1.1 --- a/xen/common/sched_rrobin.c	Wed Feb 02 09:38:32 2005 +0000
     1.2 +++ b/xen/common/sched_rrobin.c	Wed Feb 02 15:24:31 2005 +0000
     1.3 @@ -27,8 +27,6 @@ struct rrobin_dom_info
     1.4  #define RUNLIST(d)      ((struct list_head *)&(RR_INFO(d)->run_list))
     1.5  #define RUNQUEUE(cpu)   RUNLIST(schedule_data[cpu].idle)
     1.6  
     1.7 -static xmem_cache_t *dom_info_cache;
     1.8 -
     1.9  static inline void __add_to_runqueue_head(struct domain *d)
    1.10  {
    1.11      list_add(RUNLIST(d), RUNQUEUE(d->processor));
    1.12 @@ -59,21 +57,12 @@ static int rr_init_scheduler()
    1.13      for ( i = 0; i < NR_CPUS; i++ )
    1.14          INIT_LIST_HEAD(RUNQUEUE(i));
    1.15     
    1.16 -    dom_info_cache = xmem_cache_create(
    1.17 -        "RR dom info", sizeof(struct rrobin_dom_info), 0, 0, 0, NULL);
    1.18 -    if ( dom_info_cache == NULL )
    1.19 -    {
    1.20 -        printk("Could not allocate SLAB cache.\n");
    1.21 -        return -1;
    1.22 -    }
    1.23 -
    1.24      return 0;                                                                
    1.25  }
    1.26 -
    1.27  /* Allocates memory for per domain private scheduling data*/
    1.28  static int rr_alloc_task(struct domain *d)
    1.29  {
    1.30 -    if ( (d->sched_priv = xmem_cache_alloc(dom_info_cache)) == NULL )
    1.31 +    if ( (d->sched_priv = new(struct rrobin_dom_info) == NULL )
    1.32          return -1;
    1.33      memset(d->sched_priv, 0, sizeof(struct rrobin_dom_info));
    1.34      return 0;
    1.35 @@ -91,7 +80,7 @@ static void rr_add_task(struct domain *d
    1.36  static void rr_free_task(struct domain *d)
    1.37  {
    1.38      ASSERT(d->sched_priv != NULL);
    1.39 -    xmem_cache_free(dom_info_cache, d->sched_priv);
    1.40 +    xfree(d->sched_priv);
    1.41  }
    1.42  
    1.43  /* Initialises idle task */