debuggers.hg

diff xen/common/sched_bvt.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 c6f1bab39d4f 10a0f6b0a996
children bbe8541361dd 4294cfa9fad3
line diff
     1.1 --- a/xen/common/sched_bvt.c	Wed Feb 02 09:38:32 2005 +0000
     1.2 +++ b/xen/common/sched_bvt.c	Wed Feb 02 15:24:31 2005 +0000
     1.3 @@ -71,8 +71,6 @@ struct bvt_cpu_info
     1.4  #define TIME_SLOP      (s32)MICROSECS(50)     /* allow time to slip a bit */
     1.5  static s32 ctx_allow = (s32)MILLISECS(5);     /* context switch allowance */
     1.6  
     1.7 -static xmem_cache_t *dom_info_cache;
     1.8 -
     1.9  static inline void __add_to_runqueue_head(struct exec_domain *d)
    1.10  {
    1.11      list_add(RUNLIST(d), RUNQUEUE(d->processor));
    1.12 @@ -173,7 +171,7 @@ int bvt_alloc_task(struct exec_domain *e
    1.13  {
    1.14      struct domain *d = ed->domain;
    1.15      if ( (d->sched_priv == NULL) ) {
    1.16 -        if ( (d->sched_priv = xmem_cache_alloc(dom_info_cache)) == NULL )
    1.17 +        if ( (d->sched_priv = xmalloc(struct bvt_dom_info)) == NULL )
    1.18              return -1;
    1.19          memset(d->sched_priv, 0, sizeof(struct bvt_dom_info));
    1.20      }
    1.21 @@ -295,7 +293,7 @@ static void bvt_sleep(struct exec_domain
    1.22  void bvt_free_task(struct domain *d)
    1.23  {
    1.24      ASSERT(d->sched_priv != NULL);
    1.25 -    xmem_cache_free(dom_info_cache, d->sched_priv);
    1.26 +    xfree(d->sched_priv);
    1.27  }
    1.28  
    1.29  /* Control the scheduler. */
    1.30 @@ -557,7 +555,7 @@ int bvt_init_scheduler()
    1.31  
    1.32      for ( i = 0; i < NR_CPUS; i++ )
    1.33      {
    1.34 -        schedule_data[i].sched_priv = xmalloc(sizeof(struct bvt_cpu_info));
    1.35 +        schedule_data[i].sched_priv = xmalloc(struct bvt_cpu_info);
    1.36         
    1.37          if ( schedule_data[i].sched_priv == NULL )
    1.38          {
    1.39 @@ -570,14 +568,6 @@ int bvt_init_scheduler()
    1.40          CPU_SVT(i) = 0; /* XXX do I really need to do this? */
    1.41      }
    1.42  
    1.43 -    dom_info_cache = xmem_cache_create(
    1.44 -        "BVT dom info", sizeof(struct bvt_dom_info), 0, 0, NULL, NULL);
    1.45 -    if ( dom_info_cache == NULL )
    1.46 -    {
    1.47 -        printk("BVT: Failed to allocate domain info SLAB cache");
    1.48 -        return -1;
    1.49 -    }
    1.50 -
    1.51      return 0;
    1.52  }
    1.53