Re: [PATCH 03/17] create a new cgroup and move all hypervisor threads to the new cgroup

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 06, 2012 at 03:18:07PM -0600, Eric Blake wrote:
> On 08/03/2012 12:36 AM, Hu Tao wrote:
> > From: Wen Congyang <wency@xxxxxxxxxxxxxx>
> > 
> > Create a new cgroup and move all hypervisor threads to the new cgroup.
> > And then we can do the other things:
> > 1. limit only vcpu usage rather than the whole qemu
> > 2. limit for hypervisor threads(include vhost-net threads)
> > 
> > Signed-off-by: Wen Congyang <wency@xxxxxxxxxxxxxx>
> > Signed-off-by: Tang Chen <tangchen@xxxxxxxxxxxxxx>
> > Signed-off-by: Hu Tao <hutao@xxxxxxxxxxxxxx>
> > ---
> 
> >  
> > +int qemuSetupCgroupForHypervisor(struct qemud_driver *driver,
> > +                                 virDomainObjPtr vm)
> > +{
> 
> > +
> > +    for (i = 0; i < VIR_CGROUP_CONTROLLER_LAST; i++) {
> > +        if (!qemuCgroupControllerActive(driver, i)) {
> > +            VIR_WARN("cgroup %d is not active", i);
> > +            continue;
> > +        }
> 
> Do we need to do this for every controller, or only for the cpu and
> cpuacct controllers?

How about to add a third parameter to let the caller choose which cgroup
controller to set up?

-- 
Thanks,
Hu Tao

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]