From 76d99efc441407ce1b8e53eab4eef38572e603b3 Mon Sep 17 00:00:00 2001 From: Gui Jianfeng Date: Tue, 8 Feb 2011 15:00:24 +0800 Subject: [PATCH] LXC: LXC Blkio weight configuration support. LXC Blkio weight configuration support. Reviewed-by: "Nikunj A. Dadhania" Signed-off-by: Gui Jianfeng --- src/lxc/lxc_controller.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index af0b70ceb7..0db667379a 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -104,6 +104,16 @@ static int lxcSetContainerResources(virDomainDefPtr def) goto cleanup; } + if (def->blkio.weight) { + rc = virCgroupSetBlkioWeight(cgroup, def->blkio.weight); + if (rc != 0) { + virReportSystemError(-rc, + _("Unable to set Blkio weight for domain %s"), + def->name); + goto cleanup; + } + } + rc = virCgroupSetMemory(cgroup, def->mem.max_balloon); if (rc != 0) { virReportSystemError(-rc, -- GitLab