[libvirt] [PATCH 5/6 v3] LXC: LXC Blkio weight configuration support.

Eric Blake eblake at redhat.com
Tue Feb 8 18:14:57 UTC 2011


On 02/08/2011 12:00 AM, Gui Jianfeng wrote:
> LXC Blkio weight configuration support.
> 
> Reviewed-by: "Nikunj A. Dadhania" <nikunj at linux.vnet.ibm.com>
> 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..0db6673 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;
> +        }
> +    }
> +

ACK; no change needed (even with type changes introduced in commit 2 and
4).  However, the fact that you are implementing things for 2
hypervisors implies that for backporting purposes, it might have been
better to split patch 4 into two patches (one for src/conf, and the
other for scr/lxc), so that someone could cherry-pick just the src/conf
and src/lxc changes.  Not a big enough deal to worry about, though.

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 619 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110208/e64aae3a/attachment-0001.sig>


More information about the libvir-list mailing list