[libvirt] [PATCH 5/6] cputune: support cputune xml config

2011-02-27 Thread Osier Yang
cputune XML: * src/conf/domain_conf.h (New struct for vcputune and vcpupin, declarations for new internal helper functions for cputune support) * src/conf/domain_conf.c (Update "virDomainDefParseXML" to parse, and "declaration" to build cputune xml, implementations for new

[libvirt] [PATCH 4/6] cputune: support cputune xml for LXC driver

2011-02-27 Thread Osier Yang
LXC driver doesn't support vcpu affinity yet, so just need to modify it to support cpu shares. * src/lxc/lxc_controller.c (Setup cpu shares for domain) * src/lxc/lxc_driver.c (Update domain config when "lxcSetSchedulerParameters" is invoked) --- src/lxc/lxc_controller.c | 10 ++ src/l

[libvirt] [PATCH 2/6] cputune: support cputune for xend driver

2011-02-27 Thread Osier Yang
Didn't test it, and not sure if it's the correct way to add cputune xml for xend driver, and besides, seems "xm driver" and "xen hypervisor" also support vcpu affinity, do we need to add support for them too? Any suggestion on supporting cputune for xen is appreciated. :-) --- src/xen/xend_intern

[libvirt] [PATCH 3/6] cputune: support cputune for qemu driver

2011-02-27 Thread Osier Yang
When domain startup, setting cpu affinity and cpu shares according to the cputune xml specified in domain xml. Modify "qemudDomainPinVcpu" to update domain config for vcpupin, and modify "qemuSetSchedulerParameters" to update domain config for cpu shares. * src/qemu/qemu_cgroup.c * src/qemu/qemu_

[libvirt] [PATCH 6/6] cputune: Add docs xml schema for cputune xml

2011-02-27 Thread Osier Yang
* docs/schemas/domain.rng (New definition for cputune xml) * docs/formatdomain.html.in (Docs for cputune xml) --- docs/formatdomain.html.in | 21 + docs/schemas/domain.rng | 32 2 files changed, 53 insertions(+), 0 deletions(-) diff --git

[libvirt] [PATCH 1/6] cputune: new tests for testing cputune xml

2011-02-27 Thread Osier Yang
--- tests/qemuxml2argvdata/qemuxml2argv-cputune.args |4 ++ tests/qemuxml2argvdata/qemuxml2argv-cputune.xml | 33 ++ tests/qemuxml2argvtest.c |1 + tests/qemuxml2xmltest.c |1 + 4 files changed, 39 insertions(+), 0

[libvirt] Add persistent XML for cpu tunables

2011-02-27 Thread Osier Yang
These are pretty rough patches, something like a draft, I beleive there must be many problems, please review it heavily, :-) New XML: 2048 "shares" is to define the the proportional weighted cpu share for the domain. "vcpupin" is to define the cpu affinities of vcpus, it