ia64/xen-unstable

changeset 17024:49f87f3c2cb8

xend: Remove redundant xc.domain_setcpuweight() all the way down to libxenctrl.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Mon Feb 11 10:15:07 2008 +0000 (2008-02-11)
parents f8b855ffa470
children 9541494c0945
files tools/libxc/xc_domain.c tools/libxc/xenctrl.h tools/python/xen/lowlevel/xc/xc.c tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/libxc/xc_domain.c	Mon Feb 11 10:06:51 2008 +0000
     1.2 +++ b/tools/libxc/xc_domain.c	Mon Feb 11 10:15:07 2008 +0000
     1.3 @@ -350,21 +350,6 @@ int xc_shadow_control(int xc_handle,
     1.4      return (rc == 0) ? domctl.u.shadow_op.pages : rc;
     1.5  }
     1.6  
     1.7 -int xc_domain_setcpuweight(int xc_handle,
     1.8 -                           uint32_t domid,
     1.9 -                           float weight)
    1.10 -{
    1.11 -    int sched_id;
    1.12 -    int ret;
    1.13 -
    1.14 -    /* Figure out which scheduler is currently used: */
    1.15 -    if ( (ret = xc_sched_id(xc_handle, &sched_id)) != 0 )
    1.16 -        return ret;
    1.17 -
    1.18 -    /* No-op. */
    1.19 -    return 0;
    1.20 -}
    1.21 -
    1.22  int xc_domain_setmaxmem(int xc_handle,
    1.23                          uint32_t domid,
    1.24                          unsigned int max_memkb)
     2.1 --- a/tools/libxc/xenctrl.h	Mon Feb 11 10:06:51 2008 +0000
     2.2 +++ b/tools/libxc/xenctrl.h	Mon Feb 11 10:15:07 2008 +0000
     2.3 @@ -380,9 +380,6 @@ int xc_vcpu_getinfo(int xc_handle,
     2.4                      uint32_t vcpu,
     2.5                      xc_vcpuinfo_t *info);
     2.6  
     2.7 -int xc_domain_setcpuweight(int xc_handle,
     2.8 -                           uint32_t domid,
     2.9 -                           float weight);
    2.10  long long xc_domain_get_cpu_usage(int xc_handle,
    2.11                                    domid_t domid,
    2.12                                    int vcpu);
     3.1 --- a/tools/python/xen/lowlevel/xc/xc.c	Mon Feb 11 10:06:51 2008 +0000
     3.2 +++ b/tools/python/xen/lowlevel/xc/xc.c	Mon Feb 11 10:15:07 2008 +0000
     3.3 @@ -237,26 +237,6 @@ static PyObject *pyxc_vcpu_setaffinity(X
     3.4      return zero;
     3.5  }
     3.6  
     3.7 -static PyObject *pyxc_domain_setcpuweight(XcObject *self,
     3.8 -                                          PyObject *args,
     3.9 -                                          PyObject *kwds)
    3.10 -{
    3.11 -    uint32_t dom;
    3.12 -    float cpuweight = 1;
    3.13 -
    3.14 -    static char *kwd_list[] = { "domid", "cpuweight", NULL };
    3.15 -
    3.16 -    if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i|f", kwd_list, 
    3.17 -                                      &dom, &cpuweight) )
    3.18 -        return NULL;
    3.19 -
    3.20 -    if ( xc_domain_setcpuweight(self->xc_handle, dom, cpuweight) != 0 )
    3.21 -        return pyxc_error_to_exception();
    3.22 -    
    3.23 -    Py_INCREF(zero);
    3.24 -    return zero;
    3.25 -}
    3.26 -
    3.27  static PyObject *pyxc_domain_sethandle(XcObject *self, PyObject *args)
    3.28  {
    3.29      int i;
    3.30 @@ -1325,14 +1305,6 @@ static PyMethodDef pyxc_methods[] = {
    3.31        " cpumap [list, []]: list of usable CPUs.\n\n"
    3.32        "Returns: [int] 0 on success; -1 on error.\n" },
    3.33  
    3.34 -    { "domain_setcpuweight", 
    3.35 -      (PyCFunction)pyxc_domain_setcpuweight, 
    3.36 -      METH_VARARGS | METH_KEYWORDS, "\n"
    3.37 -      "Set cpuweight scheduler parameter for domain.\n"
    3.38 -      " dom [int]:            Identifier of domain to be changed.\n"
    3.39 -      " cpuweight [float, 1]: VCPU being pinned.\n"
    3.40 -      "Returns: [int] 0 on success; -1 on error.\n" },
    3.41 -
    3.42      { "domain_sethandle", 
    3.43        (PyCFunction)pyxc_domain_sethandle,
    3.44        METH_VARARGS, "\n"
     4.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Mon Feb 11 10:06:51 2008 +0000
     4.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Mon Feb 11 10:15:07 2008 +0000
     4.3 @@ -1750,9 +1750,6 @@ class XendDomainInfo:
     4.4  
     4.5              self.image = image.create(self, self.info)
     4.6  
     4.7 -            xc.domain_setcpuweight(self.domid, \
     4.8 -                                   self.info['vcpus_params']['weight'])
     4.9 -
    4.10              # repin domain vcpus if a restricted cpus list is provided
    4.11              # this is done prior to memory allocation to aide in memory
    4.12              # distribution for NUMA systems.