于 2011年03月03日 12:53, Nikunj A. Dadhania 写道:
On Sun, 27 Feb 2011 22:39:18 +0800, Osier
Yang<jyang(a)redhat.com> wrote:
> 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_driver.c
> * src/qemu/qemu_process.c
> ---
> src/qemu/qemu_cgroup.c | 15 +++++++++
> src/qemu/qemu_driver.c | 9 +++++
> src/qemu/qemu_process.c | 80 +++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 104 insertions(+), 0 deletions(-)
>
> diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
> index b39b5e1..f578f9e 100644
> --- a/src/qemu/qemu_cgroup.c
> +++ b/src/qemu/qemu_cgroup.c
> @@ -340,6 +340,21 @@ int qemuSetupCgroup(struct qemud_driver *driver,
> vm->def->name);
> }
>
> + if (qemuCgroupControllerActive(driver, VIR_CGROUP_CONTROLLER_CPU)) {
> + if (vm->def->cputune.shares != 0) {
Osier, we will need patch 5/6 before this to compile, some patch
reordering required here.
hum, yes, thanks for the reminding.
Regards
Osier