* [PATCH] Remove the related of xc_domain_setcpuweight
@ 2007-02-13 3:02 Masaki Kanno
0 siblings, 0 replies; only message in thread
From: Masaki Kanno @ 2007-02-13 3:02 UTC (permalink / raw)
To: xen-devel
[-- Attachment #1: Mail message body --]
[-- Type: text/plain, Size: 260 bytes --]
Hi,
I think that the related functions of xc_domain_setcpuweight()
is not necessary, because the CPU weight is set by
xc_sched_credit_domain_set() when the domain is created.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Best regards,
Kan
[-- Attachment #2: remove_domain_setcpuweight.patch --]
[-- Type: application/octet-stream, Size: 3593 bytes --]
diff -r ad9bbd103034 tools/libxc/xc_domain.c
--- a/tools/libxc/xc_domain.c Fri Feb 09 18:19:24 2007 +0000
+++ b/tools/libxc/xc_domain.c Tue Feb 13 10:44:37 2007 +0900
@@ -344,20 +344,6 @@ int xc_shadow_control(int xc_handle,
return (rc == 0) ? domctl.u.shadow_op.pages : rc;
}
-int xc_domain_setcpuweight(int xc_handle,
- uint32_t domid,
- float weight)
-{
- int sched_id;
- int ret;
-
- /* Figure out which scheduler is currently used: */
- if ( (ret = xc_sched_id(xc_handle, &sched_id)) != 0 )
- return ret;
-
- /* No-op. */
- return 0;
-}
int xc_domain_setmaxmem(int xc_handle,
uint32_t domid,
diff -r ad9bbd103034 tools/libxc/xenctrl.h
--- a/tools/libxc/xenctrl.h Fri Feb 09 18:19:24 2007 +0000
+++ b/tools/libxc/xenctrl.h Tue Feb 13 10:44:55 2007 +0900
@@ -374,9 +374,6 @@ int xc_vcpu_getinfo(int xc_handle,
uint32_t vcpu,
xc_vcpuinfo_t *info);
-int xc_domain_setcpuweight(int xc_handle,
- uint32_t domid,
- float weight);
long long xc_domain_get_cpu_usage(int xc_handle,
domid_t domid,
int vcpu);
diff -r ad9bbd103034 tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Fri Feb 09 18:19:24 2007 +0000
+++ b/tools/python/xen/lowlevel/xc/xc.c Tue Feb 13 10:45:06 2007 +0900
@@ -202,26 +202,6 @@ static PyObject *pyxc_vcpu_setaffinity(X
}
if ( xc_vcpu_setaffinity(self->xc_handle, dom, vcpu, cpumap) != 0 )
- return pyxc_error_to_exception();
-
- Py_INCREF(zero);
- return zero;
-}
-
-static PyObject *pyxc_domain_setcpuweight(XcObject *self,
- PyObject *args,
- PyObject *kwds)
-{
- uint32_t dom;
- float cpuweight = 1;
-
- static char *kwd_list[] = { "domid", "cpuweight", NULL };
-
- if ( !PyArg_ParseTupleAndKeywords(args, kwds, "i|f", kwd_list,
- &dom, &cpuweight) )
- return NULL;
-
- if ( xc_domain_setcpuweight(self->xc_handle, dom, cpuweight) != 0 )
return pyxc_error_to_exception();
Py_INCREF(zero);
@@ -1087,14 +1067,6 @@ static PyMethodDef pyxc_methods[] = {
" dom [int]: Identifier of domain to which VCPU belongs.\n"
" vcpu [int, 0]: VCPU being pinned.\n"
" cpumap [list, []]: list of usable CPUs.\n\n"
- "Returns: [int] 0 on success; -1 on error.\n" },
-
- { "domain_setcpuweight",
- (PyCFunction)pyxc_domain_setcpuweight,
- METH_VARARGS | METH_KEYWORDS, "\n"
- "Set cpuweight scheduler parameter for domain.\n"
- " dom [int]: Identifier of domain to be changed.\n"
- " cpuweight [float, 1]: VCPU being pinned.\n"
"Returns: [int] 0 on success; -1 on error.\n" },
{ "domain_sethandle",
diff -r ad9bbd103034 tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Fri Feb 09 18:19:24 2007 +0000
+++ b/tools/python/xen/xend/XendDomainInfo.py Tue Feb 13 10:45:17 2007 +0900
@@ -1420,8 +1420,6 @@ class XendDomainInfo:
if localtime:
xc.domain_set_time_offset(self.domid)
- xc.domain_setcpuweight(self.domid, self.info['cpu_weight'])
-
# repin domain vcpus if a restricted cpus list is provided
# this is done prior to memory allocation to aide in memory
# distribution for NUMA systems.
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-02-13 3:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-13 3:02 [PATCH] Remove the related of xc_domain_setcpuweight Masaki Kanno
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.