[libvirt] [PATCH 4/4] LXC: LXC Blkio weight configuration support.

Nikunj A. Dadhania nikunj at linux.vnet.ibm.com
Fri Jan 28 04:30:20 UTC 2011


On Thu, 27 Jan 2011 13:19:48 +0800, Gui Jianfeng <guijianfeng at cn.fujitsu.com> wrote:
> LXC Blkio weight configuration support.
> 
> Signed-off-by: Gui Jianfeng <guijianfeng at cn.fujitsu.com>
> ---
>  src/lxc/lxc_controller.c |   10 ++++++++++
>  1 files changed, 10 insertions(+), 0 deletions(-)
> 
> diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c
> index af0b70c..7bb3581 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 = virCgroupSetWeight(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,

Reviewed-by: "Nikunj A. Dadhania" <nikunj at linux.vnet.ibm.com>

Regards,
Nikunj




More information about the libvir-list mailing list