ia64/xen-unstable

changeset 1195:aaaaffbe35aa

bitkeeper revision 1.809 (4059b6abq9zvnfmJ9cVcMhBo_lOhew)

Many files:
Scheduler updates.
sched_ctl.h:
Rename: xen/include/hypervisor-ifs/sched-ctl.h -> xen/include/hypervisor-ifs/sched_ctl.h
author kaf24@scramble.cl.cam.ac.uk
date Thu Mar 18 14:48:11 2004 +0000 (2004-03-18)
parents 814cfcf225c4
children 17430e51466a
files .rootkeys tools/xc/lib/xc_atropos.c tools/xc/lib/xc_bvtsched.c tools/xc/lib/xc_private.h tools/xc/lib/xc_rrobin.c tools/xc/py/Makefile tools/xenctl/Makefile tools/xenctl/lib/console_client.py tools/xend/Makefile xen/common/dom0_ops.c xen/common/sched_rrobin.c xen/common/schedule.c xen/include/hypervisor-ifs/dom0_ops.h xen/include/hypervisor-ifs/sched-ctl.h xen/include/hypervisor-ifs/sched_ctl.h
line diff
     1.1 --- a/.rootkeys	Wed Mar 17 18:31:06 2004 +0000
     1.2 +++ b/.rootkeys	Thu Mar 18 14:48:11 2004 +0000
     1.3 @@ -501,7 +501,7 @@ 3ddb79c25UE59iu4JJcbRalx95mvcg xen/inclu
     1.4  3ead095dE_VF-QA88rl_5cWYRWtRVQ xen/include/hypervisor-ifs/kbd.h
     1.5  3ddb79c2oRPrzClk3zbTkRHlpumzKA xen/include/hypervisor-ifs/network.h
     1.6  4051db79512nOCGweabrFWO2M2h5ng xen/include/hypervisor-ifs/physdev.h
     1.7 -40589968wmhPmV5-ENbBYmMjnedgKw xen/include/hypervisor-ifs/sched-ctl.h
     1.8 +40589968wmhPmV5-ENbBYmMjnedgKw xen/include/hypervisor-ifs/sched_ctl.h
     1.9  404f3d2eR2Owk-ZcGOx9ULGHg3nrww xen/include/hypervisor-ifs/trace.h
    1.10  3f0d22cbroqp_BkoDPwkfRJhaw1LiQ xen/include/hypervisor-ifs/vbd.h
    1.11  3ddb79c4qbCoOFHrv9sCGshbWzBVlQ xen/include/scsi/scsi.h
     2.1 --- a/tools/xc/lib/xc_atropos.c	Wed Mar 17 18:31:06 2004 +0000
     2.2 +++ b/tools/xc/lib/xc_atropos.c	Thu Mar 18 14:48:11 2004 +0000
     2.3 @@ -12,11 +12,12 @@ int xc_atropos_global_set(int xc_handle,
     2.4  			  unsigned long ctx_allow)
     2.5  {
     2.6      dom0_op_t op;
     2.7 +
     2.8      op.cmd = DOM0_SCHEDCTL;
     2.9 -    op.u.schedctl.if_ver = SCHED_CTL_IF_VER;
    2.10      op.u.schedctl.sched_id = SCHED_BVT;
    2.11  
    2.12      op.u.schedctl.u.bvt.ctx_allow = ctx_allow;
    2.13 +
    2.14      return do_dom0_op(xc_handle, &op);
    2.15  }
    2.16  
    2.17 @@ -24,15 +25,12 @@ int xc_atropos_domain_set(int xc_handle,
    2.18  			  u64 domid, int xtratime)
    2.19  {
    2.20      dom0_op_t op;
    2.21 +
    2.22      op.cmd = DOM0_ADJUSTDOM;
    2.23 -
    2.24      op.u.adjustdom.domain  = (domid_t)domid;
    2.25 -    op.u.adjustdom.if_ver = SCHED_CTL_IF_VER;
    2.26      op.u.adjustdom.sched_id = SCHED_ATROPOS;
    2.27  
    2.28      op.u.adjustdom.u.atropos.xtratime = xtratime;
    2.29  
    2.30 -    printf("Doing dom0 op!\n");
    2.31 -
    2.32      return do_dom0_op(xc_handle, &op);
    2.33  }
     3.1 --- a/tools/xc/lib/xc_bvtsched.c	Wed Mar 17 18:31:06 2004 +0000
     3.2 +++ b/tools/xc/lib/xc_bvtsched.c	Thu Mar 18 14:48:11 2004 +0000
     3.3 @@ -12,10 +12,12 @@ int xc_bvtsched_global_set(int xc_handle
     3.4                             unsigned long ctx_allow)
     3.5  {
     3.6      dom0_op_t op;
     3.7 +
     3.8      op.cmd = DOM0_SCHEDCTL;
     3.9      op.u.schedctl.sched_id = SCHED_BVT;
    3.10 -    op.u.schedctl.if_ver = SCHED_CTL_IF_VER;
    3.11 +
    3.12      op.u.schedctl.u.bvt.ctx_allow = ctx_allow;
    3.13 +
    3.14      return do_dom0_op(xc_handle, &op);
    3.15  }
    3.16  
    3.17 @@ -27,16 +29,16 @@ int xc_bvtsched_domain_set(int xc_handle
    3.18                             unsigned long warpu)
    3.19  {
    3.20      dom0_op_t op;
    3.21 -    struct bvt_adjdom *adjptr = &op.u.adjustdom.u.bvt;
    3.22 +    struct bvt_adjdom *bvtadj = &op.u.adjustdom.u.bvt;
    3.23  
    3.24      op.cmd = DOM0_ADJUSTDOM;
    3.25 +    op.u.adjustdom.domain  = (domid_t)domid;
    3.26      op.u.adjustdom.sched_id = SCHED_BVT;
    3.27 -    op.u.adjustdom.if_ver   = SCHED_CTL_IF_VER;
    3.28 -    op.u.adjustdom.domain  = (domid_t)domid;
    3.29  
    3.30 -    adjptr->mcu_adv = mcuadv;
    3.31 -    adjptr->warp    = warp;
    3.32 -    adjptr->warpl   = warpl;
    3.33 -    adjptr->warpu   = warpu;
    3.34 +    bvtadj->mcu_adv = mcuadv;
    3.35 +    bvtadj->warp    = warp;
    3.36 +    bvtadj->warpl   = warpl;
    3.37 +    bvtadj->warpu   = warpu;
    3.38 +
    3.39      return do_dom0_op(xc_handle, &op);
    3.40  }
     4.1 --- a/tools/xc/lib/xc_private.h	Wed Mar 17 18:31:06 2004 +0000
     4.2 +++ b/tools/xc/lib/xc_private.h	Thu Mar 18 14:48:11 2004 +0000
     4.3 @@ -23,7 +23,7 @@
     4.4  #include <dom0_ops.h>
     4.5  #include <vbd.h>
     4.6  #include <event_channel.h>
     4.7 -#include <sched-ctl.h>
     4.8 +#include <sched_ctl.h>
     4.9  
    4.10  #define _PAGE_PRESENT   0x001
    4.11  #define _PAGE_RW        0x002
     5.1 --- a/tools/xc/lib/xc_rrobin.c	Wed Mar 17 18:31:06 2004 +0000
     5.2 +++ b/tools/xc/lib/xc_rrobin.c	Thu Mar 18 14:48:11 2004 +0000
     5.3 @@ -11,10 +11,11 @@
     5.4  int xc_rrobin_global_set(int xc_handle, u64 slice)
     5.5  {
     5.6      dom0_op_t op;
     5.7 +
     5.8      op.cmd = DOM0_SCHEDCTL;
     5.9 -    op.u.schedctl.if_ver = SCHED_CTL_IF_VER;
    5.10      op.u.schedctl.sched_id = SCHED_RROBIN;
    5.11  
    5.12      op.u.schedctl.u.rrobin.slice = slice;
    5.13 +
    5.14      return do_dom0_op(xc_handle, &op);
    5.15  }
     6.1 --- a/tools/xc/py/Makefile	Wed Mar 17 18:31:06 2004 +0000
     6.2 +++ b/tools/xc/py/Makefile	Thu Mar 18 14:48:11 2004 +0000
     6.3 @@ -4,7 +4,7 @@ all:
     6.4  
     6.5  install: all
     6.6  	if [ "$(prefix)" = "" ]; then python setup.py install; \
     6.7 -	else python setup.py install --home="$(prefix)"; fi
     6.8 +	else python setup.py install --root="$(prefix)"; fi
     6.9  
    6.10  clean:
    6.11  	rm -rf build *.pyc *.pyo *.o *.a *~
     7.1 --- a/tools/xenctl/Makefile	Wed Mar 17 18:31:06 2004 +0000
     7.2 +++ b/tools/xenctl/Makefile	Thu Mar 18 14:48:11 2004 +0000
     7.3 @@ -4,7 +4,7 @@ all:
     7.4  
     7.5  install: all
     7.6  	if [ "$(prefix)" = "" ]; then python setup.py install; \
     7.7 -	else python setup.py install --home="$(prefix)"; fi
     7.8 +	else python setup.py install --root="$(prefix)"; fi
     7.9  
    7.10  clean:
    7.11  	rm -rf build *.pyc *.pyo *.o *.a *~
     8.1 --- a/tools/xenctl/lib/console_client.py	Wed Mar 17 18:31:06 2004 +0000
     8.2 +++ b/tools/xenctl/lib/console_client.py	Thu Mar 18 14:48:11 2004 +0000
     8.3 @@ -72,4 +72,7 @@ def connect(host,port):
     8.4          __send_to_sock(sock)
     8.5  
     8.6  if __name__ == '__main__':
     8.7 +    if len(sys.argv) != 3:
     8.8 +        print sys.argv[0] + " <host> <port>"
     8.9 +        sys.exit(1)
    8.10      connect(str(sys.argv[1]),int(sys.argv[2]))
     9.1 --- a/tools/xend/Makefile	Wed Mar 17 18:31:06 2004 +0000
     9.2 +++ b/tools/xend/Makefile	Thu Mar 18 14:48:11 2004 +0000
     9.3 @@ -4,7 +4,7 @@ all:
     9.4  
     9.5  install: all
     9.6  	if [ "$(prefix)" = "" ]; then python setup.py install; \
     9.7 -	else python setup.py install --home="$(prefix)"; fi
     9.8 +	else python setup.py install --root="$(prefix)"; fi
     9.9  	mkdir -p $(prefix)/usr/sbin
    9.10  	install -m0755 xend $(prefix)/usr/sbin
    9.11  
    10.1 --- a/xen/common/dom0_ops.c	Wed Mar 17 18:31:06 2004 +0000
    10.2 +++ b/xen/common/dom0_ops.c	Thu Mar 18 14:48:11 2004 +0000
    10.3 @@ -18,7 +18,7 @@
    10.4  #include <asm/pdb.h>
    10.5  #include <xeno/trace.h>
    10.6  #include <xeno/console.h>
    10.7 -#include <hypervisor-ifs/sched-ctl.h>
    10.8 +#include <hypervisor-ifs/sched_ctl.h>
    10.9  
   10.10  extern unsigned int alloc_new_dom_mem(struct task_struct *, unsigned int);
   10.11  
    11.1 --- a/xen/common/sched_rrobin.c	Wed Mar 17 18:31:06 2004 +0000
    11.2 +++ b/xen/common/sched_rrobin.c	Thu Mar 18 14:48:11 2004 +0000
    11.3 @@ -6,7 +6,7 @@
    11.4  
    11.5  #include <xeno/sched.h>
    11.6  #include <xeno/sched-if.h>
    11.7 -#include <hypervisor-ifs/sched-ctl.h>
    11.8 +#include <hypervisor-ifs/sched_ctl.h>
    11.9  #include <xeno/ac_timer.h>
   11.10  #include <xeno/time.h>
   11.11  
   11.12 @@ -43,7 +43,7 @@ static void rr_dump_settings()
   11.13  }
   11.14  
   11.15  struct scheduler sched_rrobin_def = {
   11.16 -    .name     = "Stupid Round Robin Scheduler",
   11.17 +    .name     = "Round-Robin Scheduler",
   11.18      .opt_name = "rrobin",
   11.19      .sched_id = SCHED_RROBIN,
   11.20  
    12.1 --- a/xen/common/schedule.c	Wed Mar 17 18:31:06 2004 +0000
    12.2 +++ b/xen/common/schedule.c	Thu Mar 18 14:48:11 2004 +0000
    12.3 @@ -26,7 +26,7 @@
    12.4  #include <xeno/timer.h>
    12.5  #include <xeno/perfc.h>
    12.6  #include <xeno/sched-if.h>
    12.7 -#include <hypervisor-ifs/sched-ctl.h>
    12.8 +#include <hypervisor-ifs/sched_ctl.h>
    12.9  #include <xeno/trace.h>
   12.10  
   12.11  /*#define WAKEUP_HISTO*/
   12.12 @@ -40,8 +40,10 @@
   12.13  
   12.14  #define TIME_SLOP      (s32)MICROSECS(50)     /* allow time to slip a bit */
   12.15  
   12.16 -/* XXX MAW pull trace-related #defines out of here and into an auto-generated
   12.17 - * header file later on! */
   12.18 +/*
   12.19 + * XXX Pull trace-related #defines out of here and into an auto-generated
   12.20 + * header file later on!
   12.21 + */
   12.22  #define TRC_SCHED_DOM_ADD             0x00010000
   12.23  #define TRC_SCHED_DOM_REM             0x00010001
   12.24  #define TRC_SCHED_WAKE                0x00010002
   12.25 @@ -66,26 +68,23 @@ static void t_timer_fn(unsigned long unu
   12.26  static void dom_timer_fn(unsigned long data);
   12.27  static void fallback_timer_fn(unsigned long unused);
   12.28  
   12.29 -/* this is global for now so that private implementations can reach it */
   12.30 +/* This is global for now so that private implementations can reach it. */
   12.31  schedule_data_t schedule_data[NR_CPUS];
   12.32  
   12.33 -/* XXX would be nice if the schedulers array could get populated
   12.34 - * automagically without having to hack the code in here         */
   12.35 +/*
   12.36 + * XXX It would be nice if the schedulers array could get populated
   12.37 + * automagically without having to hack the code in here.
   12.38 + */
   12.39  extern struct scheduler sched_bvt_def, sched_rrobin_def;
   12.40  static struct scheduler *schedulers[] = { &sched_bvt_def,
   12.41                                            &sched_rrobin_def,
   12.42                                            NULL};
   12.43  
   12.44 -/* scheduler ops for the current scheduler */
   12.45 +/* Operations for the current scheduler. */
   12.46  static struct scheduler ops;
   12.47  
   12.48 -/* for scheduler functions that return void             */
   12.49 -#define SCHED_FN_VOID(fn, ...) do { if ( ops.fn ) ops.fn(__VA_ARGS__); } \
   12.50 -                               while (0)
   12.51 -
   12.52 -/* for scheduler functions that return a numeric value  */
   12.53 -#define SCHED_FN_RET(fn, ...)                             \
   12.54 -         (( ops.fn != NULL ) ? ops.fn( __VA_ARGS__ ) : 0 )
   12.55 +#define SCHED_FN(fn, ...) \
   12.56 +    ((ops.fn != NULL) ? (ops.fn(__VA_ARGS__)) : (typeof(ops.fn(__VA_ARGS__)))0)
   12.57  
   12.58  spinlock_t schedule_lock[NR_CPUS] __cacheline_aligned;
   12.59  
   12.60 @@ -102,7 +101,7 @@ extern kmem_cache_t *task_struct_cachep;
   12.61  
   12.62  void free_task_struct(struct task_struct *p)
   12.63  {
   12.64 -    SCHED_FN_VOID(free_task, p);
   12.65 +    SCHED_FN(free_task, p);
   12.66      kmem_cache_free(task_struct_cachep, p);
   12.67  }
   12.68  
   12.69 @@ -120,7 +119,7 @@ struct task_struct *alloc_task_struct(vo
   12.70  
   12.71      memset(p, 0, sizeof(*p));    
   12.72  
   12.73 -    if ( SCHED_FN_RET(alloc_task, p) < 0)
   12.74 +    if ( SCHED_FN(alloc_task, p) < 0)
   12.75      {
   12.76          kmem_cache_free(task_struct_cachep, p);
   12.77          return NULL;
   12.78 @@ -134,7 +133,7 @@ struct task_struct *alloc_task_struct(vo
   12.79   */
   12.80  void sched_add_domain(struct task_struct *p) 
   12.81  {
   12.82 -    p->state       = TASK_STOPPED;
   12.83 +    p->state = TASK_STOPPED;
   12.84  
   12.85      if( p->domain != IDLE_DOMAIN_ID )
   12.86      {
   12.87 @@ -149,14 +148,11 @@ void sched_add_domain(struct task_struct
   12.88          schedule_data[p->processor].idle = p;
   12.89      }
   12.90  
   12.91 -    SCHED_FN_VOID(add_task, p);
   12.92 +    SCHED_FN(add_task, p);
   12.93  
   12.94      TRACE_3D(TRC_SCHED_DOM_ADD, _HIGH32(p->domain), _LOW32(p->domain), p);
   12.95  }
   12.96  
   12.97 -/* XXX race condition here?   we could both add and remove a domain at once, in
   12.98 - * theory.  ick! */
   12.99 -/* XXX is the task already removed from the runlist at this point? */
  12.100  int sched_rem_domain(struct task_struct *p) 
  12.101  {
  12.102      int x, y = p->state;
  12.103 @@ -166,7 +162,7 @@ int sched_rem_domain(struct task_struct 
  12.104  
  12.105      rem_ac_timer(&p->timer);
  12.106  
  12.107 -    SCHED_FN_VOID(rem_task, p);
  12.108 +    SCHED_FN(rem_task, p);
  12.109  
  12.110      TRACE_3D(TRC_SCHED_DOM_REM, _HIGH32(p->domain), _LOW32(p->domain), p);
  12.111  
  12.112 @@ -179,9 +175,9 @@ void init_idle_task(void)
  12.113      unsigned long flags;
  12.114      struct task_struct *p = current;
  12.115  
  12.116 -    if ( SCHED_FN_RET (alloc_task, p) < 0)
  12.117 +    if ( SCHED_FN (alloc_task, p) < 0)
  12.118  		panic("Failed to allocate scheduler private data for idle task");
  12.119 -    SCHED_FN_VOID(add_task, p);
  12.120 +    SCHED_FN(add_task, p);
  12.121  
  12.122      spin_lock_irqsave(&schedule_lock[p->processor], flags);
  12.123      p->has_cpu = 1;
  12.124 @@ -202,7 +198,7 @@ void __wake_up(struct task_struct *p)
  12.125  
  12.126      p->state = TASK_RUNNING;
  12.127  
  12.128 -    SCHED_FN_VOID(wake_up, p);
  12.129 +    SCHED_FN(wake_up, p);
  12.130  
  12.131  #ifdef WAKEUP_HISTO
  12.132      p->wokenup = NOW();
  12.133 @@ -319,13 +315,10 @@ long sched_ctl(struct sched_ctl_cmd *cmd
  12.134  {
  12.135      TRACE_0D(TRC_SCHED_CTL);
  12.136  
  12.137 -    if ( cmd->if_ver != SCHED_CTL_IF_VER )
  12.138 -        return -EACCES;
  12.139 -
  12.140      if ( cmd->sched_id != ops.sched_id )
  12.141          return -EINVAL;
  12.142  
  12.143 -    return SCHED_FN_RET(control, cmd);
  12.144 +    return SCHED_FN(control, cmd);
  12.145  }
  12.146  
  12.147  
  12.148 @@ -334,9 +327,6 @@ long sched_adjdom(struct sched_adjdom_cm
  12.149  {
  12.150      struct task_struct *p;    
  12.151      
  12.152 -    if ( cmd->if_ver != SCHED_CTL_IF_VER )
  12.153 -        return -EACCES;
  12.154 -
  12.155      if ( cmd->sched_id != ops.sched_id )
  12.156          return -EINVAL;
  12.157  
  12.158 @@ -347,7 +337,7 @@ long sched_adjdom(struct sched_adjdom_cm
  12.159  
  12.160      TRACE_2D(TRC_SCHED_ADJDOM, _HIGH32(p->domain), _LOW32(p->domain));
  12.161  
  12.162 -    SCHED_FN_VOID(adjdom, p, cmd);
  12.163 +    SCHED_FN(adjdom, p, cmd);
  12.164  
  12.165      put_task_struct(p); 
  12.166      return 0;
  12.167 @@ -388,7 +378,7 @@ unsigned long __reschedule(struct task_s
  12.168      if ( schedule_data[cpu].s_timer.expires > min_time + TIME_SLOP )
  12.169          mod_ac_timer(&schedule_data[cpu].s_timer, min_time);
  12.170  
  12.171 -    return SCHED_FN_RET(reschedule, p);
  12.172 +    return SCHED_FN(reschedule, p);
  12.173  }
  12.174  
  12.175  void reschedule(struct task_struct *p)
  12.176 @@ -436,7 +426,7 @@ asmlinkage void __enter_scheduler(void)
  12.177          if ( signal_pending(prev) )
  12.178              prev->state = TASK_RUNNING;
  12.179          else
  12.180 -            SCHED_FN_VOID(do_block, prev);
  12.181 +            SCHED_FN(do_block, prev);
  12.182      }
  12.183  
  12.184      /* get policy-specific decision on scheduling... */
  12.185 @@ -623,10 +613,10 @@ void __init scheduler_init(void)
  12.186      if ( ops.do_schedule == NULL)
  12.187          panic("Chosen scheduler has NULL do_schedule!");
  12.188  
  12.189 -    if ( SCHED_FN_RET(init_scheduler) < 0 )
  12.190 +    if ( SCHED_FN(init_scheduler) < 0 )
  12.191          panic("Initialising scheduler failed!");
  12.192  
  12.193 -    SCHED_FN_VOID(add_task, &idle0_task);
  12.194 +    SCHED_FN(add_task, &idle0_task);
  12.195  }
  12.196  
  12.197  /*
  12.198 @@ -666,7 +656,7 @@ static void dump_rqueue(struct list_head
  12.199      list_for_each (list, queue) {
  12.200          p = list_entry(list, struct task_struct, run_list);
  12.201          printk("%3d: %llu has=%c ", loop++, p->domain, p->has_cpu ? 'T':'F');
  12.202 -        SCHED_FN_VOID(dump_runq_el, p);
  12.203 +        SCHED_FN(dump_runq_el, p);
  12.204          printk("c=0x%X%08X\n", (u32)(p->cpu_time>>32), (u32)p->cpu_time);
  12.205          printk("         l: %lx n: %lx  p: %lx\n",
  12.206                 (unsigned long)list, (unsigned long)list->next,
  12.207 @@ -682,12 +672,12 @@ void dump_runq(u_char key, void *dev_id,
  12.208      int i;
  12.209  
  12.210  	printk("Scheduler: %s (%s)\n", ops.name, ops.opt_name);
  12.211 -    SCHED_FN_VOID(dump_settings);
  12.212 +    SCHED_FN(dump_settings);
  12.213      printk("NOW=0x%08X%08X\n",  (u32)(now>>32), (u32)now); 
  12.214      for (i = 0; i < smp_num_cpus; i++) {
  12.215          spin_lock_irqsave(&schedule_lock[i], flags);
  12.216          printk("CPU[%02d] ", i);
  12.217 -        SCHED_FN_VOID(dump_cpu_state,i);
  12.218 +        SCHED_FN(dump_cpu_state,i);
  12.219          dump_rqueue(&schedule_data[i].runqueue, "rq"); 
  12.220          spin_unlock_irqrestore(&schedule_lock[i], flags);
  12.221      }
    13.1 --- a/xen/include/hypervisor-ifs/dom0_ops.h	Wed Mar 17 18:31:06 2004 +0000
    13.2 +++ b/xen/include/hypervisor-ifs/dom0_ops.h	Thu Mar 18 14:48:11 2004 +0000
    13.3 @@ -11,7 +11,7 @@
    13.4  #define __DOM0_OPS_H__
    13.5  
    13.6  #include "hypervisor-if.h"
    13.7 -#include "sched-ctl.h"
    13.8 +#include "sched_ctl.h"
    13.9  
   13.10  /*
   13.11   * Make sure you increment the interface version whenever you modify this file!
    14.1 --- a/xen/include/hypervisor-ifs/sched-ctl.h	Wed Mar 17 18:31:06 2004 +0000
    14.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.3 @@ -1,68 +0,0 @@
    14.4 -/**
    14.5 - * Generic scheduler control interface.
    14.6 - *
    14.7 - * Mark Williamson, (C) 2004 Intel Research Cambridge
    14.8 - */
    14.9 -
   14.10 -#ifndef _SCHED_CTL_H_
   14.11 -#define _SCHED_CTL_H_
   14.12 -
   14.13 -/**
   14.14 - * When this file is changed, increment the version number.  This ensures that
   14.15 - * tools will refuse to work (rather than causing a crash) when they're
   14.16 - * out-of-sync with the Xen version number.
   14.17 - */
   14.18 -#define SCHED_CTL_IF_VER 0x0001
   14.19 -
   14.20 -/* scheduler types */
   14.21 -#define SCHED_BVT      0
   14.22 -#define SCHED_ATROPOS  1
   14.23 -#define SCHED_RROBIN   2
   14.24 -
   14.25 -/* generic scheduler control command - union of all scheduler control
   14.26 - * command structures */
   14.27 -struct sched_ctl_cmd
   14.28 -{
   14.29 -    unsigned int if_ver;
   14.30 -    unsigned int sched_id;
   14.31 -    
   14.32 -    union
   14.33 -    {
   14.34 -        struct bvt_ctl
   14.35 -        {
   14.36 -            /* IN variables. */
   14.37 -            unsigned long ctx_allow;  /* context switch allowance */
   14.38 -        } bvt;
   14.39 -
   14.40 -        struct rrobin_ctl
   14.41 -        {
   14.42 -            /* IN variables */
   14.43 -            u64 slice;                /* round robin time slice */
   14.44 -        } rrobin;
   14.45 -    } u;
   14.46 -};
   14.47 -
   14.48 -struct sched_adjdom_cmd
   14.49 -{
   14.50 -    unsigned int if_ver;
   14.51 -    unsigned int sched_id;
   14.52 -    domid_t domain;
   14.53 -    
   14.54 -    union
   14.55 -    {
   14.56 -        struct bvt_adjdom
   14.57 -        {
   14.58 -            unsigned long mcu_adv;    /* mcu advance: inverse of weight */
   14.59 -            unsigned long warp;       /* time warp */
   14.60 -            unsigned long warpl;      /* warp limit */
   14.61 -            unsigned long warpu;      /* unwarp time requirement */
   14.62 -        } bvt;
   14.63 -
   14.64 -        struct atropos_adjdom
   14.65 -        {
   14.66 -            int xtratime;
   14.67 -        } atropos;
   14.68 -    } u;
   14.69 -};
   14.70 -
   14.71 -#endif /* _SCHED_CTL_H_ */
    15.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    15.2 +++ b/xen/include/hypervisor-ifs/sched_ctl.h	Thu Mar 18 14:48:11 2004 +0000
    15.3 @@ -0,0 +1,61 @@
    15.4 +/**
    15.5 + * Generic scheduler control interface.
    15.6 + *
    15.7 + * Mark Williamson, (C) 2004 Intel Research Cambridge
    15.8 + */
    15.9 +
   15.10 +#ifndef __SCHED_CTL_H__
   15.11 +#define __SCHED_CTL_H__
   15.12 +
   15.13 +/* Scheduler types. */
   15.14 +#define SCHED_BVT      0
   15.15 +#define SCHED_ATROPOS  1
   15.16 +#define SCHED_RROBIN   2
   15.17 +
   15.18 +/*
   15.19 + * Generic scheduler control command: union of all scheduler control command
   15.20 + * structures.
   15.21 + */
   15.22 +struct sched_ctl_cmd
   15.23 +{
   15.24 +    unsigned int sched_id;
   15.25 +    
   15.26 +    union
   15.27 +    {
   15.28 +        struct bvt_ctl
   15.29 +        {
   15.30 +            /* IN variables. */
   15.31 +            unsigned long ctx_allow;  /* context switch allowance */
   15.32 +        } bvt;
   15.33 +
   15.34 +        struct rrobin_ctl
   15.35 +        {
   15.36 +            /* IN variables */
   15.37 +            u64 slice;                /* round robin time slice */
   15.38 +        } rrobin;
   15.39 +    } u;
   15.40 +};
   15.41 +
   15.42 +struct sched_adjdom_cmd
   15.43 +{
   15.44 +    unsigned int sched_id;
   15.45 +    domid_t domain;
   15.46 +    
   15.47 +    union
   15.48 +    {
   15.49 +        struct bvt_adjdom
   15.50 +        {
   15.51 +            unsigned long mcu_adv;    /* mcu advance: inverse of weight */
   15.52 +            unsigned long warp;       /* time warp */
   15.53 +            unsigned long warpl;      /* warp limit */
   15.54 +            unsigned long warpu;      /* unwarp time requirement */
   15.55 +        } bvt;
   15.56 +
   15.57 +        struct atropos_adjdom
   15.58 +        {
   15.59 +            int xtratime;
   15.60 +        } atropos;
   15.61 +    } u;
   15.62 +};
   15.63 +
   15.64 +#endif /* __SCHED_CTL_H__ */